Commit 1754a576 by BellCodeEditor

save project

parent 3a8f1bdf
Showing with 10 additions and 3 deletions
with open(r"D:\qiuxuanci\sales_list.txt","r",encoding="utf-8") as apple: with open(r"D:\qiuxuanci\sales_list.txt","r",encoding="utf-8") as apple:
a=apple.readlines() a=apple.readlines()
for i in a: for i in a:
u=i.split() data=i.split()
print(u[1:]) sum=0
\ No newline at end of file for i in data[1:]:
sum=sum+int(i)
b=data[0]+str(sum)
print(b)
\ 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