From 30f20f21c432a59267d94e994141a716c67d32a5 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 18 Oct 2020 16:10:31 +0800 Subject: [PATCH] save project --- diy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/diy.py b/diy.py index 13fb932..e144a50 100644 --- a/diy.py +++ b/diy.py @@ -1,5 +1,4 @@ # 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' -with open(r'C:\Users\Administrator\Desktop\text.txt','a',encoding = 'utf-8')as file: - file.write("'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'") - file.write("'juh:78\n'") - file.write("'jdef:73\n'") \ No newline at end of file +filel = open(r'C:\Users\Administrator\Desktop\text.txt','w',encoding = 'utf-8') +filel.write("'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'") +filel.close() \ No newline at end of file -- libgit2 0.25.0