Logo

Programming-Idioms

History of Idiom 59 > diff from v11 to v12

Edit summary for version 12 by :

Version 11

2015-08-20, 16:46:06

Version 12

2015-08-22, 09:58:03

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Imports
import sys
Code
print(x, "is negative", file=sys.stderr)
Comments bubble
Python3