📅  最后修改于: 2022-03-11 14:47:16.547000             🧑  作者: Mango
# Print to the text file
file = open('log.txt', 'w')
print('This is a sample print statement', file = file)
print('Hello World', file = file)
file.close()