(from: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files) with open('workfile') as f: read_data = f.read()