Commit 0e94eb76 by BellCodeEditor

save project

parent d1f0b871
Showing with 7 additions and 3 deletions
...@@ -2,5 +2,9 @@ with open(r'c:\Users\admin\Desktop\大智的文件.txt','r',encoding='utf-8') as ...@@ -2,5 +2,9 @@ with open(r'c:\Users\admin\Desktop\大智的文件.txt','r',encoding='utf-8') as
b=a.readlines() b=a.readlines()
for i in b: for i in b:
c=i.split() c=i.split()
print(c[1:]) #print(c[1:])
sum=0
\ No newline at end of file for d in c[1:]:
sum=sum+int(d)
e=c[0]+str(sum)
print(e)
\ 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