Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #reads 100 random lines from a given text file.
- import random
- f=open("names.txt","r")
- start = input("Press the 'G' key to go!!!")
- if start == "g":
- for x in range(0, 100):
- lines = open("names.txt").read().splitlines()
- myline =random.choice(lines)
- print(myline)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement