Created
September 11, 2019 16:15
-
-
Save DuncantheeDuncan/f1eb5abd5974f2a72c706360a8878c5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this program takes a string to be replaced | |
# by another string in ceratina char(index) | |
# and return the new string/ word. | |
words = raw_input("enter a name:") | |
print words | |
replace = raw_input("Enter word to replace:") | |
if replace in words: | |
i = words.replace(replace,"&&&&"); | |
print i | |
else: | |
print 'Hint: - refer to built-in functions for strings.' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment