Commit d0aaa265 by BellCodeEditor

auto save

parent 86ba1c4a
Showing with 7 additions and 2 deletions
......@@ -2,4 +2,9 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco
b=a.readlines()
for i in b:
c=i.split()
print(c[1:])
\ No newline at end of file
sum=0
#print(c[1:])
for sales in c[1:]:
sum+=int(sales)
result=c[0]+str(sum)
print(result)
\ 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