Skip to content

Instantly share code, notes, and snippets.

@BDFife
Created July 3, 2014 00:54
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 BDFife/f8193f390c25bc0341fe to your computer and use it in GitHub Desktop.
Save BDFife/f8193f390c25bc0341fe to your computer and use it in GitHub Desktop.
Python Scramble Text
#!/usr/bin/python
import sys
import random
text = sys.stdin.read()
new_text = ""
for char in text:
if random.random() > 0.9:
new_text += random.choice("*._=`~")
else:
new_text += char
sys.stdout.write(new_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment