Commit a7168637 by BellCodeEditor

auto save

parent 87f298fb
Showing with 4 additions and 2 deletions
with open(r"c:\Users\86186\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as file10:
a=file10.readlines()
#print(a)
sum = 0
for content in a:
message = content.split()
sum = 0
#print(message[1:])
for i in message[1:]:
sum+=int(i)
print(sum)
reslut = message[0] +str(sum)
print(reslut)
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