Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get first line of file python

with open('myfile.txt') as f:
    first_line = f.readline()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #line #file #python
ADD COMMENT
Topic
Name
4+6 =