The other case involving print >>obj, "Hello World"
is the "print chevron" syntax for the print
statement in Python 2 (removed in Python 3, replaced by the file
argument of the print()
function). Instead of writing to standard output, the output is passed to the obj.write()
method. A typical example would be file objects having a write()
method. See the answer to a more recent question: Double greater-than sign in Python.