Lisp mentality vs. Python mentality

Piet van Oostrum piet at cs.uu.nl
Sun Apr 26 15:37:39 CEST 2009


>>>>> "Ciprian Dorin, Craciun" <ciprian.craciun at gmail.com> (CDC) wrote:

>CDC>     About the compare (a, b, operator.lt) it does the same as a < b,
>CDC> where a and b are lists of numbers.


>>> a=[1, 2, 3]
>>> b=[1, 2, 4]
>>> compare (a, b, operator.lt)
False
>>> a < b
True

-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list