Replace all : String Replace « String « Python






Replace all

Replace all
S = 'xxxxSPAMxxxxSPAMxxxx'
print S.replace('SPAM', 'EGGS')           # replace all


           
       








Related examples in the same category

1.Replace oneReplace one
2.String replacementString replacement
3.String replace DemoString replace Demo
4.String method: With a minor replacementString method: With a minor replacement