Read all lines : readlines « File « Python Tutorial






import pprint
pprint.pprint(open(r'c:\test.txt').readlines())
12.12.readlines
12.12.1.Read all lines
12.12.2.Read lines into a buffer
12.12.3.Determining the Number of Lines in a File