Advertisement
182days

Text File Scrambler

May 10th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #rebuilds a text file book into a random version.
  2. import random
  3. f=open("alice.txt","r")
  4. start = input("Press the 'G' key to go!!!")
  5. if start == "g":
  6.     for x in range(0, 3666):
  7.         lines = open("alice.txt").read().splitlines()
  8.         myline =random.choice(lines)
  9.         g=open("alice_converted.txt","a")
  10.         g.write(str(myline) + "\n")
  11.         print(myline)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement