Standard error
Standard error is one of the two writable file streams that is used for printing errors, warning messages, or any outputs that shouldn't be mixed with the main program. Table of contents Printing w...

Source: www.pythonmorsels.com
Standard error is one of the two writable file streams that is used for printing errors, warning messages, or any outputs that shouldn't be mixed with the main program. Table of contents Printing writes to "standard output" by default Python also has a "standard error" stream Standard output vs. standard error Standard error isn't just for errors When is standard error usually used? Print atypical output to standard error Printing writes to "standard output" by default When we call Python's print function, Python will write to standard output: >>> print("Hi!") Hi! Standard output is a file-like object, also known as a file stream. The standard output file-like object is represented by the stdout object in Python's sys module. If we look at the documentation for Python's print function, we'll see that by default, print writes to sys.stdout: >>> help(print) Help on built-in function print in module builtins: print(*args, sep=' ', end='\n', file=None, flush=False) Prints