📅  最后修改于: 2022-03-11 14:45:35.270000             🧑  作者: Mango
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