►
Run
s1 = 'cat says hey. concat catalog.' old = 'cat' new = 'dog' s2 = s1.replace(old, new, 1) print(s2)
Output