Commit 644bd28d by BellCodeEditor

save project

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