This is the code I\'m using (got it from here), but it gives me an error message
ID: 3912173 • Letter: T
Question
This is the code I'm using (got it from here), but it gives me an error message saying:
Traceback (most recent call last):
File "C:/Users//AppData/Local/Programs/Python/Python36-32/ch7 #7(drivers license exam).py", line 2, in <module>
infile = open("C:A1.txt",'r')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\A1.txt'
Explanation / Answer
Error is because its not able to find File name
=> You should use // instead of one /
Try with below Options
1) C:\A1.txt
2) C:/A1.txt
Let me know if you face any issue. Comment and I will help and make it work
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.