Untitled
Anonymous
plain_text
12/05/2021 9:38 PM
420 B
16
Indexable
import random
HiddenWordList = []
words = []
def pick_word(infile):
with open(infile) as f:
contents_of_file = f.read()
lines = contents_of_file.splitlines()
line_number = random.randrange(0, len(lines))
return lines[line_number]
def main():
return(pick_word("vocab.txt"))
main()
Editor is loading...