python - File cannot be found using open() -


the code not finding notepad document, please help

send_report_tuple = ('wet', 'water', 'liquid') #make list input input_list = answer.split(" ") #and use function comprehension list if any(e in send_report_tuple e in input_list):     file = open('notepad', 'r')     print = file 

make sure file in same directory python script or put full path it. should put file extension in name

i.e.

file = open('notepad.txt', 'r')


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -