Commit 09be9642 by BellCodeEditor

save project

parent 5ec53ebb
Showing with 19 additions and 0 deletions
#c:\Users\user\Documents\lesson13-1\sales_list.txt
with open(r'c:\Users\user\Documents\lesson13-1\sales_list.txt','r',encoding='UTF-8')as b:
a=b.readlines()
for i in a:
c=i.split()
#print(c[1:])
e=0
for d in c[1:]:
e=e+int(d)
f=c[0],d
print(c[0],d)
j=[]
with open(r'c:\Users\user\Documents\lesson13-1\hh.txt','w',encoding='UTF-8')as file:
file.writelines(j)
\ No newline at end of file
j=['aaaaaaaa\n','ooooooooooo\n','eeeeeeeeee\n']
with open(r'c:\Users\user\Documents\lesson13-1\hh.txt','w',encoding='UTF-8')as file:
file.writelines(j)
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