vendredi 21 août 2015

Pick a random line from a text file and store it in a variable (Python 3)

I am trying to code a program which reads a file, which will contain many words (one word per line), then selects a random line (word) from the file, so I am able to store it in a variable for me to use later on.

I don't really know where to start as I am not very experienced. Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire