You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen, maar niet pushen of problemen/pull-requests openen.

5 jaren geleden
1234567891011121314151617181920
  1. import random
  2. def choisir_mot_au_hasard():
  3. fichier = open("mots.txt")
  4. contenu = fichier.read()
  5. fichier.close()
  6. mots = contenu.splitlines()
  7. n = len(mots)
  8. index = random.randint(0, n - 1)
  9. return mots[index]
  10. def main():
  11. mot = choisir_mot_au_hasard()
  12. print(mot)
  13. main()