Commit a8ea166d by BellCodeEditor

save project

parent 0cc37ad4
Showing with 9 additions and 0 deletions
with open(r'c:\Users\admin\Desktop\sales_list.txt.txt','r',encoding='utf-8') as fill:
a=fill.readlines()
for i in a:
new_a=i.split()
qian=0
for b in new_a[1:]:
qian=qian+int(b)
print(new_a[0]+str(qian))
\ 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