Commit ecf6fb16 by BellCodeEditor

save project

parent a8d02629
Showing with 9 additions and 0 deletions
b=''
with open(r"C:\Users\玛酷机器人编程中心\Desktop\test.txt",'r',encoding='utf-8') as a:
for i in a:
if '小强:10' in i:
i=i.replace('小强:10','小强:11')
b += i
with open(r"C:\Users\玛酷机器人编程中心\Desktop\test.txt",'w',encoding='utf-8') as a:
a.write(b)
\ 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