代码找不到记事本文档,请帮助
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
确保您的文件与python脚本位于同一目录中,或者为其放置完整路径。您还应该将文件扩展名为
。
file = open('Notepad.txt', 'r')