Commit 4e8e3484 by BellCodeEditor

save project

parent 0ce7b30d
Showing with 6 additions and 1 deletions
......@@ -2,5 +2,9 @@ with open(r'c:\Documents\lesson13_1\sales_list.txt','r',encoding='utf-8')as file
text=file.readlines()
for i in text:
data=i.split()
print(data[1:])
sum=0
for a in data[1:]:
sum=sum+int(a)
cil=data[0]+str(sum)
print(cil)
\ 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