📜  py 文件打开方式 - Python 代码示例

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

代码示例1
with open('output.txt', 'w') as file:  # Use file to refer to the file object

    file.write('Hi there!')