Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to read a file in python

# when you want to read the file from terminal in python use 
import sys
f = open(sys.argv[1])
line=f.readline()
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #read #file #python
ADD COMMENT
Topic
Name
1+2 =