Commit a9a2c5c6 by BellCodeEditor

save project

parent 86f77f2d
Showing with 8 additions and 3 deletions
with open(r'c:\Users\张琰\Desktop\新建文本文档.txt','r',encoding='utf-8')as file: with open(r'c:\Users\张琰\Desktop\sales_list.txt.txt','r',encoding='utf-8')as file:
a=file.readlines() a=file.readlines()
for i in a: for i in a:
b=i.split() b=i.split()
print(b[1]) #print(b[1])
\ No newline at end of file sum=0
for sales in b[1:]:
sum=sum+int(sales)
c=b[0]+str(sum)
print(c)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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