wybór losowe słowo w Pythonie z pliku tekstowego
import random
print(random.choice(open('file.txt').read().split()).strip())
Inquisitive Iguana
import random
print(random.choice(open('file.txt').read().split()).strip())
import random
def importword(): # finding a random word in the dictionary
file = open("wdd.txt", "r")
for x in range(0,random.randint(0,466909)):
word = file.readline(x)
return word