how to randomly choose a word from a text file python code example
Example: choice random word in python from a text file
import random
print(random.choice(open('file.txt').read().split()).strip())
import random
print(random.choice(open('file.txt').read().split()).strip())