String method: With a minor replacement : String Replace « String « Python






String method: With a minor replacement

String method: With a minor replacement

quote = "Python is easy to use."

print "Original quote:"
print quote

print "\nWith a minor replacement:"
print quote.replace("five", "millions of")

print "\nOriginal quote is still:"
print quote

           
       








Related examples in the same category

1.Replace allReplace all
2.Replace oneReplace one
3.String replacementString replacement
4.String replace DemoString replace Demo