Created
July 3, 2014 00:54
-
-
Save BDFife/f8193f390c25bc0341fe to your computer and use it in GitHub Desktop.
Python Scramble Text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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