Commit 02992e99 by BellCodeEditor

auto save

parent 487834a6
Showing with 9 additions and 0 deletions
with open(r"C:\Users\Think\Desktop\新建文本文档.txt","r",encoding="utf-8")as file:
a = file.readlines()
for i in a:
b=i.split()
sum=0
for s in b[1:]:
sum=sum+int(s)
t=b[0]+str(sum)
print(t)
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