📌  相关文章
📜  python : 将文件的所有内容读入一个字符串(使用'with open') - Python 代码示例

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

代码示例1
with open('the-zen-of-python.txt') as f:
    contents = f.read()
    print(contents)