So this code is made with python
and kivy
. Problem is that sometimes words may appear more than once. Basically, it's repeating some words. The goal is that I don't want to repeat a single specific word more than once. Here's my python
code:
file = open("words.txt", "r", encoding="utf8")
file = file.read()
individual_words = file.split()
random_number = randint(0, len(individual_words))
self.ids.words_areva.text = str(individual_words[random_number])
Aucun commentaire:
Enregistrer un commentaire