Commit 779764aa by BellCodeEditor

save project

parent 1973ed1c
Showing with 8 additions and 8 deletions
...@@ -2,14 +2,14 @@ with open(r'sales_list.txt','r',encoding='utf-8') as file: ...@@ -2,14 +2,14 @@ with open(r'sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
#print(a) #print(a)
for i in a: for i in a:
date=i.split() date=i.split()
print(date[1:])
sum=0 sum=0
for y in date[1:]: for y in date[1:]:
sum=sum+int(y) sum=sum+int(y)
sum=date[0]+str(sum) sum=date[0]+str(sum)
print(sum) print(sum)
......
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