This language bar is your friend. Select your favorite languages!
Edit summary for version 13 :

Version 12

Version 13

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 >>sys.stderr, "%s is negative" % x
Comments bubble
Python2

If possible, use the python3 with "from _future__ import print_function"