Commit 9e6f8457 by BellCodeEditor

save project

parent 22097de0
Showing with 7 additions and 3 deletions
with open(r'D:\陈铭祺\sales_list.txt','r',encoding='UTF-8') as book: with open(r'D:\陈铭祺\sales_list.txt','r',encoding='UTF-8') as book:
a=book.readline() a=book.readlines()
for i in a: for i in a:
data=i.split() data=i.split()
print(data[1:]) sum=0
\ No newline at end of file for y in data[1:]:
sum=sum+int(y)
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