Commit 6fa9259b by BellCodeEditor

save project

parent 6834782b
Showing with 5 additions and 2 deletions
...@@ -2,4 +2,7 @@ with open(r'c:\Users\EDZ\Desktop\sale.list.txt','r',encoding='utf-8') as file: ...@@ -2,4 +2,7 @@ with open(r'c:\Users\EDZ\Desktop\sale.list.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
for i in a: for i in a:
list=i.split() list=i.split()
print(list[0],list[1:]) total=0
\ No newline at end of file for b in list[1:]:
total+=int(b)
print(list[0],total)
\ 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