Programa de Python para evaluar si un archivo está cerrado o no
with open('file1.txt','r') as f:
print(f.closed)
f.close()
print(f.closed)
Man
with open('file1.txt','r') as f:
print(f.closed)
f.close()
print(f.closed)