examples/files/slurp.py
#!/usr/bin/env python
from __future__ import print_function

filename = 'examples/files/numbers.txt'

f = open(filename, 'r')
lines = f.read()   # reads all the lines into a string
f.close()

print(len(lines))   # number of characters in file

print(lines)        # the content of the file

read(20) will read 20 bytes.