Why this simple code:
# Python 3.11.4
file = open('pe.txt','w')
file.write("que")
file.close()
That opens a text file called o, writes "que" and closes, launches error: OSError: [Errno 9] Bad file descriptor
in file.close()
, any ideas?
pe.txt
has read and write permissions and is not open.