I wanted to print output to the console and to a file without using the logging module. I made the following function:
def print_(output_contents, output_file):