Commit a46b7a43 by BellCodeEditor

save project

parent 8bd0e8dd
Showing with 4 additions and 3 deletions
with open(r'c:\Users\Think\Documents\lesson13-1\sales_list.txt')as mufan:
with open(r'c:\Users\Think\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8')as mufan:
a=mufan.readlines()
for i in a:
data=i.split()
......@@ -6,4 +6,6 @@ for i in a:
for sales in data[1:]:
sum=sum+int(sales)
result = data[0]+str(sum)
print(result)
\ No newline at end of file
final_sum.append(result)
with open(r'c:\Users\Think\Documents\lesson13-1\sales_list.txt','a',encoding='utf-8')as mufan:
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