-2
with open('file1.txt', 'r', encoding='utf-8') as x, open('file2.txt', 'r', encoding='utf-8') as y:

My code is in the same directory as the files. How come I am getting this error?

w0rdpr3ss
  • 1
  • 2
  • 1
    Does this answer your question? [What exactly is current working directory?](https://stackoverflow.com/questions/45591428/what-exactly-is-current-working-directory) – Sören Sep 18 '22 at 17:32

1 Answers1

1

In my case it works. You can print os.getcwd() just to be sure.

TenSzalik
  • 41
  • 4