For reading the entire file in Python you can use the following piece of code which will be the better solution:-
with open('Path/to/file', 'r') as content_file:
content = content_file.read()
This will always close the file immediately after the block ends; even if an exception occurs.