Saturday, March 2, 2019

Replace Function - Python3

ip=input("Enter the string: ")
a=input("Enter the string you want to replace: ")
b=input("Enter the new string: ")
c=ip.replace(a,b)
print("String after replacement:")
print (c)

ScreenShot:

No comments:

Post a Comment