📌  相关文章
📜  从文本文件中选择 Python 中的随机单词 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:02.586000             🧑  作者: 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