Commit 6ce9c3b7 by BellCodeEditor

save project

parent 78c1e33c
Showing with 7 additions and 4 deletions
with open(r "c:\Users\蔡沛希\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as a: with open(r"c:\Users\蔡沛希\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as a:
d=a.readline() d=a.readlines()
for i in d: for i in d:
date=i.split() date=i.split()
sum = 0
print(date[1:]) for j in date[1:]:
sum += int(j)
b=date[0] + str(sum)
print(b)
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