Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read all text file python

# Open a file: file
file = open('my_text_file',mode='r')
 
# read all lines at once
all_of_it = file.read()
 
# close the file
file.close()
 
PREVIOUS NEXT
Tagged: #read #text #file #python
ADD COMMENT
Topic
Name
9+3 =