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
a=file.readlines()
for i in a:
n=i.split()
print(n[0])
for i in a:
n=i.split()
print(n[1:])
\ No newline at end of file
z=0
for s in n[1:]:
z=z+int(s)
print(n[0]+str(z))
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