replacing a substring : Replace : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Replace »

 

replacing a substring


string1 = "One, one, one, one, one, one"

print "Original:", string1
print 'Replaced "one" with "two":', 
   string1.replace"one""two" )
print "Replaced 3 maximum:", string1.replace"one""two")



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Replace