Commit 06cb79e2 by BellCodeEditor

save project

parent 1d75d302
Showing with 5 additions and 2 deletions
......@@ -8,7 +8,10 @@
# with open(r'C:\Users\Administrator\Desktop\da cong ming.txt','w',encoding='utf-8')as file1:
# filel.write('小强:12本\n')
# filel.write('小兰:15本\n')
new_date=''
with open(r'C:\Users\Administrator\Desktop\da cong ming.txt','r',encoding='utf-8')as file1:
for date in file1:
if '小强:12本'in date:
print('在')
\ No newline at end of file
new_date=date.raplace('小强:12本','小强:11本')
print(new_date)
\ 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