📜  如何使用 open - Python 代码示例

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

代码示例1
with open('output.txt', 'w') as file:  # Use file to refer to the file object
  file.write('Hi there!')
# more down here
# https://www.pythonforbeginners.com/files/with-statement-in-python