<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _exit_with_output(content, exit_code=0):
 """ Exit the program with printing out messages. :param content: content to print out :param exit_code: Exit code """

    (sys.stdout if exit_code == 0 else sys.stderr).write(content + os.linesep)
    sys.exit(exit_code)