Commit 241fadc6 by BellCodeEditor

auto save

parent 5ec53ebb
Showing with 29 additions and 0 deletions
with open(r'c:\Users\Admin\Documents\lesson13-1\sales_list.txt',"r",encoding="utf-8") as file:
a=file.readlines()
ddd=[]
for i in a:
data=i.split()
sss=0
#print(i[1:])
for s in data[1:]:
sss=sss+int(s)
o=data[0]+str(sss)+"\n"
print(o)
ddd.append(o)
with open(r"C:\Users\Admin\Desktop\kjjugyricdktfukrdkutfuy.txt","a",encoding="utf-8") as file:
file.writelines(ddd)
悟空348
诺依380
小贝182
李丽201
宋扬107
王明245
李强164
孙小白222
苏琪137
刘若若147
刘阳226
王胜男123
王娇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