Hello,

How do I avoid this error message everytime I utilize wordlist = 
open("words.text") ?

>>> wordlist = open("words.txt")
Traceback (most recent call last):
  File "<pyshell#303>", line 1, in <module>
    wordlist = open("words.txt")
FileNotFoundError: [Errno 2] No such file or directory: 'words.txt'
>>> def calculate_abecedarian():
total_count = 0
for word in wordlist:
if is_abecedarian(word):
print (word)
total_count += 1
return total_count

or

>>> if __name__ == '__main__':
    fin = open('words.txt', 'r')
    print (no_contain(fin))


Traceback (most recent call last):
  File "<pyshell#213>", line 2, in <module>
    fin = open('words.txt', 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'words.txt'


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to