Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to read file every line as list

with open(filename) as file:
    lines = file.readlines()
    lines = [line.rstrip() for line in lines]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #read #file #line #list
ADD COMMENT
Topic
Name
7+5 =