Commit 3d51eb7b by BellCodeEditor

save project

parent 17482627
Showing with 6 additions and 2 deletions
......@@ -5,7 +5,11 @@
# ll.close()
# with open(r'C:\Users\Administrator\Desktop\kk.txt','a',encoding='utf-8')as file:
# file.write("小兰:12本\n")
data_all = ""
with open(r'C:\Users\Administrator\Desktop\kk.txt','r',encoding='utf-8')as file:
for i in file:
if "小兰" in i:
print("Yes")
\ No newline at end of file
i=i.replace('23','22')
data_all = data_all+i
with open(r'C:\Users\Administrator\Desktop\kk.txt','w',encoding='utf-8')as file:
file.write(data_all)
\ 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