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 | Removing Initial word from string
- Program to check if a string contains any special character
- Python | Frequency of each character in String
- Python | Lowercase first character of String
- Ways to remove i'th character from string in Python
- Python | Find position of a character in given string
- Python | Split string on Kth Occurrence of Character
- Python | Count occurrences of a character in string
- 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 | Insert character after every character pair
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.