Commit 753d716d by BellCodeEditor

save project

parent 9e4ff7a6
Showing with 6 additions and 2 deletions
......@@ -2,4 +2,9 @@ with open(r'C:\Users\XMBC\Documents\lesson13-1\sales_list.txt',"r",encoding="utf
s=a.readlines()
for i in s:
b=i.split()
print(b[0],b[1:])
\ No newline at end of file
sum=0
for sales in b[1:]:
sum+=int(sales)
d=b[0]+str(sum)
print(d)
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