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 | Removing newline character from string
- Python program to find occurrence to each character in given string
- Python Regex | Program to accept string ending with alphanumeric character
- Python | Removing Initial word from string
- Python | Removing unwanted characters from string
- Program to check if a string contains any special character
- How to capitalize first character of string in Python
- Python | Lowercase first character of String
- Python | Frequency of each character in String
- Ways to remove i'th character from string in Python
- Python | Count occurrences of a character in string
- Python | Split string on Kth Occurrence of Character
- Python | Find position of a character in given string
- Python | Check order of character in string using OrderedDict( )
- Python | Construct string from character frequency tuple
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.