Commit 1c67a3fe by BellCodeEditor

save project

parent a1fe8b9e
Showing with 2 additions and 4 deletions
with open(r'c:\Users\003\Documents\lesson13-3\sales_list.txt','r',encoding='utf-8')as aa:
bb=aa.readlines()
bb=aa.readlines()
for i in bb:
print(i)
data=i.split()
s=0
for sales in data[1:]:
s=s+int(sales)
r=data[0]+str(s)
r=data[0]+" "+str(s)
print(r)
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