Mar-22-2022, 10:24 PM
(Mar-22-2022, 09:39 PM)deanhystad Wrote: Did you call the function?
hello,
when calling the function:
write_list_to_file(wordlst,myfile)I get:
Error:NameError Traceback (most recent call last)
/tmp/ipykernel_6780/3840483989.py in <module>
6 myfile.write(word) #write element in myfile
7 print(write_list_to_file(wordlst,filename)) #nothing happens
----> 8 write_list_to_file(wordlst,myfile)
9 # votre code ici
NameError: name 'myfile' is not defined