Commit 94f8a801 by BellCodeEditor

save project

parent 9d1e9f7a
Showing with 6 additions and 4 deletions
with open(r'C:\Users\电脑二号\Desktop\sale_list.txt','r',encoding='utf-8') as a: with open(r'C:\Users\电脑二号\Desktop\sale_list.txt','r',encoding='utf-8') as a:
a=a.readlines() a=a.readlines()
for i in a: for i in a:
data=i.split() data=i.split()
print(data[0]) sum=0
print(data[1:]) for b in data[1:]:
\ No newline at end of file sum=sum+int(b)
c=data[0]+str(sum)
print(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