查找字符串的内容是否在从列表中随机选择的单词中?

时间:2016-12-02 23:09:53

标签: python

有人可能会告诉我如何处理这段代码吗? 它总是回来真实

def find_letter(letter, lst): 
    return any(letter in wordChosen 
               for wordChosen in attempt)

attempt = input("Enter the letter you think is in the word")
find_letter(attempt, wordChosen)
print find_letter(attempt, wordChosen)`

0 个答案:

没有答案