Commit 553c28c6 by BellCodeEditor

save project

parent 3088a95a
Showing with 11 additions and 4 deletions
ass = 'c:\\Users\\EDZ\\Desktop\\test.txt' ass = 'c:\\Users\\EDZ\\Documents\\lesson13_2\\sales_list.txt'
with open(ass,'r',encoding='utf-8') as d: with open(ass,'r',encoding='utf-8') as d:
a = d.read() list_a = d.readlines()
# print(a) # print(a)
for i in list_a: for i in list_a:
print(i) data = i.split()
\ No newline at end of file # print(data[1:])
sum=0
for si in data[1:]:
sum=sum+int(si)
print(sum)
final_sum.append(sum)
with open(ass,'r',encoding='utf-8') as d:
d.writelines(filal.sum)
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