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 capitalize the first and last character of each word in a string
- Python program to find occurrence to each character in given string
- Python Regex | Program to accept string ending with alphanumeric character
- Python program to read character by character from a file
- Python | Removing unwanted characters from string
- Python | Removing Initial word from string
- Program to check if a string contains any special character
- Python | K Character Split String
- Python | Frequency of each character in String
- Python - Lowercase Kth Character in string
- How to capitalize first character of string in Python
- Python - Least Frequent Character in String
- Python | Lowercase first character of String
- Python | Split string on Kth Occurrence of Character
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.