Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #rebuilds a text file book into a random version.
- import random
- f=open("alice.txt","r")
- start = input("Press the 'G' key to go!!!")
- if start == "g":
- for x in range(0, 3666):
- lines = open("alice.txt").read().splitlines()
- myline =random.choice(lines)
- g=open("alice_converted.txt","a")
- g.write(str(myline) + "\n")
- print(myline)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement