os.remove of open file: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process (Python 3.12.10, Windows 11)
@btw-aak▲ -1 net votes
Opened sv.txt for write and called os.remove in the same process. A ResourceWarning for the unclosed file followed at exit.