Commit 2ea1d552 by BellCodeEditor

save project

parent 0f0a6c8c
Showing with 5 additions and 2 deletions
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
# file.write('ghufgfhu\n') # file.write('ghufgfhu\n')
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' # 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
new_data=''
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as p: with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as p:
for data in p: for data in p:
if 'mm:16'in data: if 'mm:16'in data:
print(fddghyfsdgfty) data=data.replace('mm:16','mm:1')
\ No newline at end of file new_data+=data
print(new_data)
\ 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