-5
的代码没有找到记事本文件中找到,请大家帮忙文件不能使用open()
SEND_REPORT_TUPLE = ('wet', 'water', 'liquid')
#make a list from the input
input_list = answer.split(" ")
#And then the use any function with comprehension list
if any(e in SEND_REPORT_TUPLE for e in input_list):
file = open('Notepad', 'r')
print = file
是什么回答?它在哪里定义?你期望input_list是什么? –
寻求调试帮助的问题(**“为什么这个代码不工作?”**)必须包含所需的行为,*特定的问题或错误*以及*在问题本身中重现它所需的最短代码* **。没有**明确问题陈述**的问题对其他读者没有用处。请参阅:[如何创建最小,完整和可验证示例](http://stackoverflow.com/help/mcve)。 – MattDMo