Commit c8b8016d by BellCodeEditor

save project

parent 37afc064
Showing with 7 additions and 3 deletions
...@@ -6,5 +6,9 @@ for i in a: ...@@ -6,5 +6,9 @@ for i in a:
sum0 sum0
for sales in data[1:]: for sales in data[1:]:
sum=sum+int(sales) sum=sum+int(sales)
result=data[0]+str(sum) result=data[0]+str(sum)+'\n'
print(result) final_sum.append(result)
\ No newline at end of file
g='utf-8')as file:with open(r'C:\Users\Administrator\Desktop\sales_list.txt','r',encodin
flie.writelines(final_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