📜  用于评估文件是否关闭的 Python 程序 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:45.587000             🧑  作者: Mango

代码示例1
with open('file1.txt','r') as f:
    print(f.closed)
    f.close()
    print(f.closed)