Commit bfa464bc by BellCodeEditor

save project

parent 40a616ab
Showing with 7 additions and 3 deletions
with open(r'c:\Users\mac\Desktop\新建文件夹\豆子.txt','r',encoding='utf-8') as file1: with open(r'c:\Users\mac\Desktop\新建文件夹\豆子.txt','r',encoding='utf-8') as file1:
g=file1.readlines() g=file1.readlines()
for i in g: for i in g:
a=i.split() a=i.split()
print(a[1:]) sum=0
for e in a[1:]:
sum=sum+int(e)
print(a[0]+str(sum))
......
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