Commit 7af387d3 by BellCodeEditor

save project

parent d1536a55
Showing with 19 additions and 0 deletions
with open("sales_list.txt","r",encoding="utf-8") as f:
a = f.readlines()
y = []
for i in a:
d = i.split()
c = d[1:]
b = 0
for x in c:
b += int(x)
e = d[0],b,"\n"
y.append(e)
with open("sales_list.txt","w",encoding="utf-8") as f:
f.writelines(y)
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