Commit a3c62f5e by BellCodeEditor

save project

parent c223bc0f
Showing with 12 additions and 2 deletions
...@@ -6,9 +6,18 @@ with open(r'./sales_list.txt','r',encoding='utf-8') as file: ...@@ -6,9 +6,18 @@ with open(r'./sales_list.txt','r',encoding='utf-8') as file:
#print(a) #print(a)
#a=file.readlines() #a=file.readlines()
#print(a) #print(a)
#a=file.readlines()
#for line in a:
#print(line)
#a=file.readlines()
#for line in a:
#date=line.split()
#print(date[1:])
a=file.readlines() a=file.readlines()
for line in a: for line in a:
date=line.split() date=line.split()
#print(line) sum=0
print(date[1:]) for i in date[1:]:
sum += int(i)
print(f'{date[0]}: {sum}')
\ 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