.replace()
String objects now have a method called replace for replacing all instances of a substring in a string with another.
s = 'aaabbb' s = s.replace('aaa', 'bbb') # 's' is now 'bbbbbb'