Commit 3877be87 by BellCodeEditor

save project

parent d1536a55
Showing with 14 additions and 0 deletions
with open("sales_list.txt","r",encoding="utf-8") as file:
f = file.readines()
for i in f:
data = i.split(" ")
sum = 0
for num in data[1:]
if num not in{'\n', '', ' '}
sum += int(num)
final_list.append(data[0] + str(num))
file.close()
with open("sum_list.txt","w", encoding="utf-8") as file2:
file2.writelines(final_list)
file.close()
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