Commit d42fabca by BellCodeEditor

save project

parent a9622957
Showing with 5 additions and 0 deletions
......@@ -3,6 +3,10 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco
a=f.readlines()
for i in a:
d=i.split()
sum=0
for sales in d[1:]:
sum=sum+int(sales)
r=d[0]+str(sum)
print(d[0])
print(d[1:])
\ 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