Commit 298da496 by BellCodeEditor

auto save

parent ce27d3fc
Showing with 6 additions and 2 deletions
with open(r'c:\Users\Administrator\Desktop\1.txt','r',encoding='utf-8') as l: with open(r'c:\Users\Administrator\Desktop\1.txt','r',encoding='utf-8') as l:
ll=l.readlines() ll=l.readlines()
f=[]
for a in ll: for a in ll:
a=a.split() a=a.split()
sum=0 sum=0
for w in a[1:]: for w in a[1:]:
sum=sum+int(w) sum=sum+int(w)
s=a[0]+":"+str(sum) s=a[0]+":"+str(sum)\n
print(s) f.append()
with open(r'c:\Users\Administrator\Desktop\1.txt','r',encoding='utf-8') as kk:
kk.writelines(s)
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