【发布时间】:2014-02-12 01:37:04
【问题描述】:
我和我的朋友正在研究单词及其含义,我需要帮助来尝试获取我们想要了解的单词。我有一个我们在命令行中键入的单词列表,它将告诉计算机我们想要我们想要的单词的含义或历史。我的问题是找出我们输入的单词。到目前为止,这是我的代码:
Meaning = {"Meaning", "define", "history"}
text1 = raw_input("Text: ")
tokens = commands.lower().split()
if Meaning.intersection(tokens):
#Here is the problem, because i don't know what word we might type
#so i need it to check the word after the Meaning. How can i do this?
我正在使用该程序输入网站并获取有关单词的信息,因此我无法添加单词和定义,因为我知道的每个单词都太难了。意思后面的词怎么取呢,谢谢。
【问题讨论】:
-
“我和我的朋友正在研究单词及其含义” - 是您实际在做的事情,还是用于介绍您的家庭作业并为您将要做的事情提供动力的框架装置实施?我们需要知道是否将您指向english.stackexchange.com。