Computer Science
Write a program to remove 'i' (if any) from a string.
Python
Python String Manipulation
9 Likes
Answer
input_string = input("Enter a string: ")
result_string = input_string.replace('i', '')
print("String after removing 'i':", result_string)Output
Enter a string: institute
String after removing 'i': nsttute
Answered By
3 Likes
Related Questions
Write a script to partition the string 'INSTITUTE' at the occurrence of letter 'T'.
What will be the output of the following programming code?
str = "My Python Programming" print (str[-5:-1]) print (str[1:5]) print (str[:-4]) print (str[0:]) print (str[:13-4]) print (str[:3])Write a program to count the number of each vowel in a given string.
Write a program that reads a line, then counts how many times the word 'is' appears in the line and displays the count.