Commit 3a4b88ae by BellCodeEditor

auto save

parent 250cda7d
Showing with 8 additions and 0 deletions
with open(r'c:\Users\MKJQR\Desktop\xxs.txt','r',encoding='utf-8') as file: with open(r'c:\Users\MKJQR\Desktop\xxs.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
for i in a:
s=i.split()
sum=0
for u in s[1:]:
sum+=int(u)
n=s[0]+' '+str(sum)
print(n)
\ No newline at end of file
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