How to run random word on txt file
I have python code and want to print a random word of a txt file how do we do this?
There are a bajillion ways of doing this, but one way is to read the file, use
split() to separate the data into a word list, then use
random.choice() to select a random word.