Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created June 12, 2016 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/4a9c1ccee37615079fa1c91db7ab4dc4 to your computer and use it in GitHub Desktop.
Save codecademydev/4a9c1ccee37615079fa1c91db7ab4dc4 to your computer and use it in GitHub Desktop.
Codecademy export
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