Answers for "how to replace string with anotehr python"

1

how to replace string in python

text = "python is too difficult , I have a good experience with it"
#python is too difficult I am using this text for example only
print(text.replace('difficult', 'easy'))
#####output#####
#python is too easy , I have a good experience with it
Posted by: Guest on October-12-2021

Code answers related to "how to replace string with anotehr python"

Python Answers by Framework

Browse Popular Code Answers by Language