Commit 9f8507b6 by BellCodeEditor

auto save

parent 800a6d64
Showing with 3 additions and 6 deletions
......@@ -2,8 +2,5 @@ with open(r'c:\Users\hp\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8
a=f.readlines()
for i in a:
b=i.split()
sum=0
for l in b[1:]:
sum=sum+int(l)
n=b[0]+str(sum)
print(n)
\ No newline at end of file
print(b[0])
print(b[1:])
\ 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