0
Why this is not working? Showing no output. file can open and there are words without e in file too.
def no_e(word): if 'e' in word: return True else: return False file= open('words.txt') for line in file: line=line.strip() if no_e(line)==True: print(line)
3 Answers
+ 2
Neeraj Agarwal No here it will not give error. Just file will return null.
+ 1
Neeraj Agarwal Because file doesn't exist.
0
Then it will show error that file or directory is not available