Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to read files in python

#Read files with loop
#Replace (File path) with your text file's path
file = open("(File path)", "r")

text = ""

for line in file:
  text = "%s
%s"%(text, line)
  
print(text)
 
PREVIOUS NEXT
Tagged: #read #files #python
ADD COMMENT
Topic
Name
7+5 =