Given the string, we have to remove the ith indexed character from the string.
In any string, indexing always start from 0. Suppose we have a string geeks then its indexing will be as –
g e e k s 0 1 2 3 4
Input : Geek i = 1 Output : Gek Input : Peter i = 4 Output : Pete
Approach : From the given string, i-th indexed element has to be removed. So, Split the string into two halves, before indexed character and after indexed character. Return the merged string.
Below is the implementation of above approach :
- Python program to find occurrence to each character in given string
- Python Regex | Program to accept string ending with alphanumeric character
- Python | Removing unwanted characters from string
- Python | Frequency of each character in String
- Program to check if a string contains any special character
- Python | Count occurrences of a character in string
- Python | Find position of a character in given string
- Ways to remove i'th character from string in Python
- Python | Check order of character in string using OrderedDict( )
- Python program to find the most occurring character and its count
- Generate two output strings depending upon occurrence of character in input string in Python
- Python program to sort a string
- Python | Removing strings from tuple
- Python | Removing first element of list
- Python program to check if a string is palindrome or not
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.