Commit 1689d325 by BellCodeEditor

save project

parent c8cb698c
Showing with 6 additions and 7 deletions
with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
q=[]
for i in a:
date=i.split()
print(date[1:])
data=i.split()
sum=0
for i in date[1:]:
g=sum+int(date)
print(data[0]+str(g))
for sales in data[1:]:
sum=sum+int(sales)
result=data[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