Commit d19776a8 by BellCodeEditor

auto save

parent 4f3eda38
Showing with 9 additions and 7 deletions
with open("sales_list.txt","r",encoding="utf-8") as file1:
a = file1.readlines()
for i in a:
data = i.split()
name = data[0]
number = data[1:]
print(name)
print(number)
\ No newline at end of file
data = i.split()
name = data[0]
number = data[1:]
sum = 0
for sb in number:
sum += int(sb)
result = sum
print(data[0]+str(result))
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