Commit 5260a9bd by BellCodeEditor

save project

parent 1707705e
Showing with 8 additions and 2 deletions
......@@ -2,5 +2,10 @@ with open(r'c:\Users\ASUS\Documents\lesson13-1\sales_list.txt','r',encoding='UTF
e=a.readlines()
for i in e:
f=i.split()
print(f[0],end=':')
print(f[1:])
#print(f[0],end=':')
#print(f[1:])
sum=0
for sales in f[1:]:
sum=int(sum)+int(sales)
p=f[0]+str(sum)
print(p)
\ 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