Commit 75f7d946 by BellCodeEditor

save project

parent d68b515e
Showing with 8 additions and 3 deletions
with open(r'c:\Users\jone\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as files:
open(r'c:\Users\jone\Documents\lewithsson13-1\sales_list.txt','r',encoding='utf-8') as files:
a=files.readlines()
list01=[]
for i in a:
date=i.split()
print(data[1:])
sum=0
for j in data[1:]:
sum= sum + j
\ No newline at end of file
sum= sum + int(j)
str01=data[0] +':'+ str(sum)
list01.append(str01)
open(r'c:\Users\jone\Documents\lewithsson13-1\sales_list.txt','w',encoding='utf-8') as files:
files.writelines()
\ 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