python read entire file

with open('pagehead.section.htm','r') as f:
    output = f.read()

Here is what the above code is Doing:
1. It’s opening the file pagehead.section.htm and reading it into a variable called output.
2. It’s printing the contents of the variable output.
3. It’s closing the file.