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