摘要: 了解 Python 的 with 语句 通过一个例子展示 with 语句的用法 需求:打开一个文件,并打印文件内容 一般写法 files = open('/file.txt') content = files.read() print(files.read()) files.close() 使用 w 阅读全文