Commit 2be433a7 by BellCodeEditor

save project

parent 5de416d6
Showing with 9 additions and 2 deletions
......@@ -4,5 +4,12 @@ with open(r'c:\Users\Windows 7\Documents\lesson13-1\sales_list.txt','r',encoding
for i in a:
#print(i)
new_num=i.split()
print(new_num[0])
print(new_num[1:])
#print(new_num[0])
#print(new_num[1:])
sum=0
for d in new_num[1:]:
sum=sum+int(d)
v=new_num[0]+str(sum)
print(v)
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