Commit 5aa931ce by BellCodeEditor

auto save

parent b11e614d
Showing with 29 additions and 2 deletions
fn = []
with open(r"c:\Users\admin\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as a: with open(r"c:\Users\admin\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as a:
a = a.readlines() a = a.readlines()
for i in a: for i in a:
print(i) i = i.split()
\ No newline at end of file s = 0
for k in i[1:]:
k = int(k)
s = s + k
print(i[0],s)
res = i[0] + str(s) + "\n"
fn.append(res)
print(fn)
with open(r"c:\Users\admin\Documents\lesson13-1\jj.txt","w",encoding="utf-8") as a:
a.write("jj\n")
a.writelines(fn)
jj48
诺依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