Commit 69965fe1 by BellCodeEditor

save project

parent 5d712435
Showing with 9 additions and 4 deletions
......@@ -4,10 +4,15 @@
# a.close()
with open(r'C:\Users\EDZ\Desktop\book.txt','r',encoding='utf-8') as a:
for i in a:
if 'x:12' in i:
print("有")
data_list=''
for data in a:
if 'x:12' in data:
data= data.replace('x:12','11')
data_list+=data
print(data_list)
with open(r'C:\Users\EDZ\Desktop\book.txt','w',encoding='utf-8') as a:
a.write(data_list)
# else:
# print("没有")
......
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