我有一个文本文件,一行有六个单词,我需要从该行随机生成一个单词。文本文件名为 WordsForGames.txt。我正在制作一个刽子手游戏。到目前为止,这就是我所拥有的。我有点失落请帮助
import random
import os
print(" Welcome to the HangMan game!!\n","You will have six guesses to get the answer correct, or you will loose!!!",)
words = open("../WordsForGames.txt")
Run Code Online (Sandbox Code Playgroud) python ×1