Skip to content

Instantly share code, notes, and snippets.

@utinajerolps
Created September 11, 2014 20:49
Show Gist options
  • Save utinajerolps/50260bf294fba334ca8a to your computer and use it in GitHub Desktop.
Save utinajerolps/50260bf294fba334ca8a to your computer and use it in GitHub Desktop.
def censor(text,word):
text = str(text)
word = str(word)
new_stars = "*" * len(word)
text = text.replace(word,new_stars)
return text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment