Commit 75e50414 by BellCodeEditor

save project

parent 898a3c24
Showing with 2 additions and 2 deletions
...@@ -6,9 +6,9 @@ g.write('小强:15\n') ...@@ -6,9 +6,9 @@ g.write('小强:15\n')
#g.close() #g.close()
with open(r'C:\Users\Administrator\Desktop\sb.txt','w',encoding='utf_8') as g: with open(r'C:\Users\Administrator\Desktop\sb.txt','w',encoding='utf_8') as g:
g.write('小张:10\n') g.write('小张:10\n')
g.write('小强:15\n') g.write('小强:15\n')
for i in g: for i in g:
if '小张:10\n' in g: if '小张:10\n' in i:
i=i.replace('10','11') i=i.replace('10','11')
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