Back to Lesson

Print to stderr

Print an error message to standard error.

Instructions

  • Import the
    sys
    module.
  • Use
    print()
    with the
    file
    parameter to print "Error occurred" to
    sys.stderr
    .
main.py
main.py