From 253ffd853cda0dbb2eaae7664519f9bcab5580b0 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 8 Jan 2022 11:14:56 +0800 Subject: [PATCH] save project --- diy.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 diy.py diff --git a/diy.py b/diy.py new file mode 100644 index 0000000..c52b435 --- /dev/null +++ b/diy.py @@ -0,0 +1,16 @@ +# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' +#file1=open(r'C:\Users\stu100\Desktop\test.txt','w',encoding='UTF-8') +#file1.write('小兰:12本\n') +#file1.write('小丽:11本\n') +#file1.write('张伟:16本\n') +#file1.close() +#with open(r'C:\Users\stu100\Desktop\test.txt','a',encoding='UTF-8')as filel: +# filel.write('李文:9本\n') +with open(r'C:\Users\stu100\Desktop\test.txt','r',encoding='UTF-8')as filel: +a=filel.read() + for data in filel: + + + + + -- libgit2 0.25.0