Commit 74ab95e5 by BellCodeEditor

auto save

parent be591c17
Showing with 10 additions and 3 deletions
...@@ -8,5 +8,12 @@ url=r'c:\Users\ryc66\OneDrive - 6699e5\Desktop\1.txt' ...@@ -8,5 +8,12 @@ url=r'c:\Users\ryc66\OneDrive - 6699e5\Desktop\1.txt'
# file=open(url,"a",encoding="utf-8") # file=open(url,"a",encoding="utf-8")
# file.write('小明:10本\n') # file.write('小明:10本\n')
# file.close() # file.close()
with open(url,"a",encoding="utf-8") as file: # with open(url,"a",encoding="utf-8") as file:
file.write('小红:13本\n') # file.write('小红:13本\n')
\ No newline at end of file with open(url,"r",encoding="utf-8") as file:
# a=file.read()
# print(a)
for i in file:
# print(i)
if "李文:9本" in i:
print(1)
\ 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