Commit f86195bd by BellCodeEditor

save project

parent d1e880a3
Showing with 8 additions and 4 deletions
with open('c:\\Users\\Administrator\\Documents\\lesson13_2\\sales_list.txt','r',encoding='utf-8') as a: with open('c:\\Users\\Administrator\\Documents\\lesson13_2\\sales_list.txt','r',encoding='utf-8') as a:
b=a.readlines() b=a.readlines()
for i in b: for i in b:
lia=i.split() lia=i.split()
print(lia[1:]) zong=0
\ No newline at end of file for s in lia[1:]:
zong=int(s)+zong
jie = lia[0]+str(zong)
print(jie)
\ 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