Read entire file

Use with open(...) as f: content = f.read().

with open('file.txt', 'r', encoding='utf-8') as f:
    text = f.read()