Commit 413ee99d by BellCodeEditor

save project

parent ef5115bb
Showing with 8 additions and 2 deletions
......@@ -17,9 +17,9 @@ list.close()
list = open(r"c:\Users\EDZ\Documents\lesson13-1\sales_list.txt",'r',encoding='utf-8')
file_list=[]
b=0
a = list.readlines()
print(a)
for i in a:
c=0
data = i.split()
......@@ -29,6 +29,11 @@ for i in a:
b = int(j)
c = c + b
c = str(c)
print(name + c)
d = name + c + "\n"
file_list.append(d)
list.close()
list = open(r"c:\Users\EDZ\Documents\lesson13-1\sales_list.txt",'w',encoding='utf-8')
list.writelines(file_list)
list.close()
\ 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