DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
1+8 =
Submit