[Tutor] comparing lists, __lt__ and __gt__
keridee at jayco.net
Tue Jul 31 01:09:21 CEST 2007
> That having been saisd their is another use for >> which is to append
> output to a file, as in:
> print 'hello world' >> myfile
> sends the string to myfile instead of to stdout. (Although I couldn't
> get this to
> work when I tried it!)
> Alan G.
>From Dive Into Python Section 10.2
print >> sys.stderr, 'entering function'
Right idea, wrong order. :-)
More information about the Tutor