Instantly share code, notes, and snippets.

@codecademydev /script.py Secret
Created Jun 12, 2016

Embed
What would you like to do?
Codecademy export
def censor(text,word):
for i in word:
new_text=""
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