PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'students.txt' -> 'students.txt.bak'
I also ran into this error because,
I was opening the file whe it was already open
make sure that you are doing it right