Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

append file to list python

list=[]
f = open('file.txt','r')

for line in f:
    list.append(line.rstrip())  #if you want the 
 replace rstrip by strip
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #file #list #python
ADD COMMENT
Topic
Name
5+8 =