More random to secrets

This commit is contained in:
Adrià Casajús 2022-03-29 18:42:28 +02:00
parent b15facb6e4
commit 19e87a7156
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import random
import secrets
import string
import time
@ -17,7 +16,7 @@ with open(WORDS_FILE_PATH) as f:
def random_word():
return random.choice(_words)
return secrets.choice(_words)
def word_exist(word):