Commit 73cdb074 by BellCodeEditor

auto save

parent 05757c92
Showing with 4 additions and 6 deletions
...@@ -2,8 +2,7 @@ with open(r'c:\Users\18725\Documents\lesson13-1\sales_list.txt','r',encoding="ut ...@@ -2,8 +2,7 @@ with open(r'c:\Users\18725\Documents\lesson13-1\sales_list.txt','r',encoding="ut
a=file.readlines() a=file.readlines()
for i in a: for i in a:
n=i.split() n=i.split()
print(n[0]) z=0
for i in a: for s in n[1:]:
n=i.split() z=z+int(s)
print(n[1:]) print(n[0]+str(z))
\ 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