Mir Khashkhash Mir Khashkhash - 5 months ago 16
Python Question

How to read the entire file into a list in python?

I want to read an entire file into a python list any one knows how to?

Max Max
print "\nReading the entire file into a list."
text_file = open("read_it.txt", "r")
lines = text_file.readlines()
print lines
print len(lines)
for line in lines:
    print line