Untitled
unknown
plain_text
3 years ago
315 B
2
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...