From 9d73d05e51a25b07ccc55d36fde5ce4851cb1411 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 14 Mar 2021 15:05:13 +0800 Subject: [PATCH] save project --- diy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diy.py b/diy.py index c28655f..c972582 100644 --- a/diy.py +++ b/diy.py @@ -11,12 +11,12 @@ a.close()''' a.write('小美:12本\n') a.write('小蓝:1000000000000000000000000000000000000000000000000000000000000000000000000000000000000本\n') a.close()''' -with open(r"C:\Users\ASUS\Desktop\test.txt",'w',encoding='utf-8')as a - a.write('小兰:10本\n') +with open(r"C:\Users\ASUS\Desktop\test.txt",'w',encoding='utf-8')as a: + '''a.write('小兰:10本\n') a.write('小丽:11本\n') a.write('小美:12本\n') a.write('小蓝:1000000000000000000000000000000000000000000000000000000000000000000000000000000000000本\n') - a.close() + a.close()''' for data in a: if '小强:10本'in data: print('数据在文件中') \ No newline at end of file -- libgit2 0.25.0