Commit 1e9c2f4b by BellCodeEditor

save project

parent fa8108df
Showing with 10 additions and 3 deletions
......@@ -2,5 +2,12 @@ with open(r'c:\Users\makcoo\Documents\lesson13_2\sales_list.txt',"r",encoding="u
a=file.readlines()
for i in a:
ss=i.split()
print(ss[0])
print(ss[1:])
\ No newline at end of file
sum=0
for sales in ss[1:]:
sum=sum+int(sales)
q=ss[0]+str(sum)
print(q)
# ss[0]+sum
# print(ss[0])
# print(ss[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