Commit a1f389ae by BellCodeEditor

save project

parent 794dfe11
Showing with 12 additions and 0 deletions
with open(r'C:\Users\jiaozhoumaku\Desktop\ea.txt','r',encoding='utf-8')as ff:
f=ff.readlines()
l=[]
for a in f:
a=a.split()
sum=0
for r in a[1:]:
sum+=int(r)
r=a[0]+"==="+str(sum)+"\n"
l.append(r)
with open(r'C:\Users\jiaozhoumaku\Desktop\ea.txt','a',encoding='utf-8')as ff:
ff.writelines(l)
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