I tried using a file '.txt' located in the same folder as the '.py' file which is supposed to manipulate it and it never works just with the filename and extension in python 3.8. I am on windows 10 pro.
I am just sharing maybe you could go through the same.