Commit 665f996e by BellCodeEditor

save project

parent a17f2854
Showing with 6 additions and 5 deletions
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
with open(r'C:\Users\Think\Desktop\text.txt','a',encoding='utf-8') as a: with open(r'C:\Users\Think\Desktop\text.txt','r',encoding='utf-8') as a:
a.write("小李:2\n")
a.write("小明:2\n") for i in a:
a.close() if "小李:2" in i:
\ No newline at end of file print("文件在文件夹里面")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment