replace substring of strin python code example
Example: python replace substring
txt = "I like bananas"
x = txt.replace("bananas", "apples")
print(x) # ----> I like apples
txt = "I like bananas"
x = txt.replace("bananas", "apples")
print(x) # ----> I like apples