Some Python Examples
← prev | next →     Top-level ToC     /stdin-stdout-stderr.html     (printable version)

Printing:

print('a', 'b', 'c', sep=':')  # prints "a:b:c"

Print to stderr:

import sys
print('hi', file=sys.stderr)

To do:

  • get input from the user
  • output colored text