python replace every instance substring 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