Commit f28e5c33 by BellCodeEditor

save project

parent 7b02a8ed
Showing with 37 additions and 3 deletions
悟空348诺依380小贝182李丽201宋扬107王明245李强164孙小白222苏琪137刘若若147刘阳226王胜男123王娇131悟空348
诺依380
小贝182
李丽201
宋扬107
王明245
李强164
孙小白222
苏琪137
刘若若147
刘阳226
王胜男123
王娇131
悟空348
诺依380
小贝182
李丽201
宋扬107
王明245
李强164
孙小白222
苏琪137
刘若若147
刘阳226
王胜男123
王娇131
with open("sales_list.txt","r",encoding="utf-8")as file: with open("sales_list.txt","r",encoding="utf-8")as file:
for i in file: a=file.readlines()
print(i) w=[]
\ No newline at end of file for i in a:
s=i.split()
sum=0
for j in s[1:]:
sum=sum+int(j)
data=s[0]+str(sum)+"\n"
w.append(data)
with open("313.txt","a",encoding="utf-8")as file:
file.writelines(w)
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