How to replace a word in a string with Python

1 Answer

0 votes
s = 'Programming Python Programming'

print(s)

s = s.replace('Programming', 'Pro')

print(s)



'''
run:

Programming Python Programming
Pro Python Pro

'''

 



answered Oct 25, 2020 by avibootz
...