Permission denied when opening .txt file with python
I had the same problem today! I don't know if It's too late now, but this is my solution: insert the entire file-path for your file.
Example:
file = open(&quot;C:\\Users\\userName\\Desktop\\Codes\\f.txt&quot;,&quot;w&quot;)