📌  相关文章
📜  如何在python代码示例中从文本文件中获取随机单词

📅  最后修改于: 2022-03-11 14:46:40.933000             🧑  作者: Mango

代码示例2
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