Robotics & Artificial Intelligence
Write a Python program to perform the following tasks.
a. "Hello, my friends, I am Jeck"
b. Replace Jeck with Tiya
Python String Manipulation
1 Like
Answer
string = "Hello, my friends, I am Jeck"
new_string = string.replace("Jeck", "Tiya")
print(new_string)Output
Hello, my friends, I am Tiya
Answered By
1 Like
Related Questions
Fill in the blanks:
- """Hello How are you?
I am good.""" is an example of ……………. . - The ……………. operator returns true if a character does not belong to a string.
- In Python ……………. is used to introduce a new line.
- The ……………. function takes an iterator as an input of argument.
- The isdigit() function returns ……………. if all the elements in the string are digits.
- """Hello How are you?
Write a Python program to convert all the letters of a string in uppercase.
Write a Python program to check the index of a particular character.
Write a Python program to create a sub string from a string.