# file =open("test13.txt","w+",encoding="UTF-8")
# file.write("如懿传")
#文件是否关闭
# print(file.closed)
# file.close();
# print(file.closed)
"""
`with....as..... 上下文管理器
"""
with open("test13.txt","w+",encoding="UTF-8") as file:
file.write("如懿传")
print(file.closed)