I am trying to get the first word in a line (e.g. apple, book, chair). I have a long list of French words and their meanings in English:
French,English
partie,part
histoire,history
chercher,search
seulement,only
police,police
...
This list is stored in a csv. I want to get a random French word from this list. Does anybody know how I can do this?
My code(currently):
import random
with open('data/french_words.csv', 'r') as french_words:
french_words_list = french_words.readlines()
rand_french_word = random.choice(french_words_list)