Commit 39f54d25 by BellCodeEditor

save project

parent f1057c53
Showing with 6 additions and 4 deletions
...@@ -3,8 +3,10 @@ with open(r'c:\Users\XMBC\Desktop\sales_list.txt','r',encoding='utf-8') as file: ...@@ -3,8 +3,10 @@ with open(r'c:\Users\XMBC\Desktop\sales_list.txt','r',encoding='utf-8') as file:
# print(a) # print(a)
for i in a: for i in a:
date=i.split() date=i.split()
print(date[1:]) # print(date[1:])
for i in date[1:]: sum=0
sum=date[1:] for sales in date[1:]:
print(int(sum)) sum=sum+int(sales)
result=date[0]+str(sum)
print(result)
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