Can we change the any character of the string in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Can we change the any character of the string in python?

str="Hello moto" How to change it to Hello world?

9th Apr 2019, 4:46 PM
Usama Navid
Usama Navid - avatar
1 Answer
+ 4
a way is: str.replace("moto","world")
9th Apr 2019, 5:04 PM
Programmer