first_string = 'bean likes to sell his beans'
second_string = first_string.replace('beans', 'cars')
third_string = second_string.replace('bean', 'robert')
print((first_string, second_string, third_string))
Замените все вхождения определенных слов