Commit 5f940caf by BellCodeEditor

save project

parent 4eef4a58
Showing with 15 additions and 14 deletions
...@@ -6,7 +6,7 @@ for i in a: ...@@ -6,7 +6,7 @@ for i in a:
sum=0 sum=0
for sales in data[1:]: for sales in data[1:]:
sum+=int(sales) sum+=int(sales)
result=data[0]+str(sum)+"\n" result=data[0]+" "+str(sum)+"\n"
final_sum.append(result) final_sum.append(result)
with open(r"c:\Users\admin\Documents\lesson13-5\new_sales_list.txt","w",encoding="utf-8")as file2: with open(r"c:\Users\admin\Documents\lesson13-5\new_sales_list.txt","w",encoding="utf-8")as file2:
file2.writelines(final_sum) file2.writelines(final_sum)
\ No newline at end of file
悟空348 悟空 348
诺依380 诺依 380
小贝182 小贝 182
李丽201 李丽 201
宋扬107 宋扬 107
王明245 王明 245
李强164 李强 164
孙小白222 孙小白 222
苏琪137 苏琪 137
刘若若147 刘若若 147
刘阳226 刘阳 226
王胜男123 王胜男 123
王娇131 王娇 131
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