Skip to content

Instantly share code, notes, and snippets.

@CesarNog
Created February 3, 2015 12:10
Show Gist options
  • Save CesarNog/67de91bf931b39e875a3 to your computer and use it in GitHub Desktop.
Save CesarNog/67de91bf931b39e875a3 to your computer and use it in GitHub Desktop.

Revisions

  1. CesarNog created this gist Feb 3, 2015.
    8 changes: 8 additions & 0 deletions censor.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    def censor(text, word):
    asterisk = ''

    for letter in word:
    asterisk += '*'

    newText = text.replace(word, asterisk);
    return newText