Commit 3dbb33af by BellCodeEditor

save project

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