Commit ad0e4528 by BellCodeEditor

save project

parent 3491f8bb
Showing with 7 additions and 3 deletions
with open(r"c:\Users\hp\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as a: with open(r"c:\Users\hp\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as a:
data = a.readlines() data = a.readlines()
print(data)
for i in data: for i in data:
print(data) b = i.split()
\ No newline at end of file sum =0
for j in b[1:]:
sum = sum+int(j)
c = b[0]+str(sum)
print(c)
\ 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