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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -