Commit b8f15bd2 by BellCodeEditor

save project

parent 3c1b0fcb
Showing with 7 additions and 2 deletions
...@@ -2,4 +2,9 @@ with open('sales_list.txt','r',encoding='utf-8') as file1: ...@@ -2,4 +2,9 @@ with open('sales_list.txt','r',encoding='utf-8') as file1:
a=file1.readlines() a=file1.readlines()
for i in a: for i in a:
c=i.split() c=i.split()
print(c[0],' '.join(c[1:])) g=0
\ No newline at end of file for j in c[1:]:
g+=int(j)
print(c[0],end='')
print(g)
\ 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