Commit 871f150d by BellCodeEditor

save project

parent 9e8d2b45
Showing with 2 additions and 3 deletions
...@@ -7,11 +7,10 @@ for i in a : ...@@ -7,11 +7,10 @@ for i in a :
data=i.split() data=i.split()
sum=0 sum=0
for se in data[1:]: for se in data[1:]:
sum=sum+int(se) sum=sum+int(se)
m=data[0]+str(sum) m=data[0]+str(sum)
f2.append(m) f2.append(m)
print(m) print(m)
t_sum.append(y) f2.append(m)
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding="utf-8") as t: with open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding="utf-8") as t:
t.writelines(f2) t.writelines(f2)
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