Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read file line by line into list

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