-
-
Save codecademydev/4a9c1ccee37615079fa1c91db7ab4dc4 to your computer and use it in GitHub Desktop.
Codecademy export
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
def censor(text,word): | |
new_text="" | |
for i in word: | |
if i in text: | |
i="*" | |
new_text+=i | |
return new_text | |
print censor("hey hey why","hey") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment