From 1beaa23e7897b6877ea709a36e970ff72d34458f Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 22 Jul 2023 15:03:24 +0800 Subject: [PATCH] save project --- diy.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/diy.py b/diy.py index 3ddd977..906a629 100644 --- a/diy.py +++ b/diy.py @@ -1,3 +1,5 @@ -file=open(r"C:\Users\makcoo\Desktop\text.txt","w",encoding="utf-8") -file.while("小兰:12本") -file.close() \ No newline at end of file +#file=open(r"C:\Users\makcoo\Desktop\text.txt","w",encoding="utf-8") +#file.write("小兰:12本") +#file.close() +with open(r"C:\Users\makcoo\Desktop\text.txt","a",encoding="utf-8")as file: + file.write("小强:12本\n") -- libgit2 0.25.0