Steven D'Aprano ha scritto: > On Sat, 30 Jul 2005 13:30:20 +0000, Adriano Varoli Piazza wrote: > > >>But tell me, how do you think sort works if not with <, >, ==, <= and >= >>? I'm really interested. > > > How do you sort words in a dictionary? Why does five come before four > when the number five is larger than the number four? Why does hundred > come before ten? What does it mean to say that elephant is less than > mouse? > > When you can answer those questions, you will be enlightened. >
>>> 'a' > 'A' True >>> 'a' > '-' True >>> 'a' > 'h' False Whiiiiii. I just discovered the Ascii table! wooot! (Your EBCDIC mileage might vary) What does it have to do with complex numbers, pray tell? and how do you think any string sort works if not by comparing the numerical value of each character? Once more: >>> 'five' < 'four' True >>> 'five' < 'Four' False >>> 'Five' < 'Four' True Ooohhh! magic of ascii! -- Adriano Varoli Piazza The Inside Out: http://moranar.com.ar MSN: [EMAIL PROTECTED] ICQ: 4410132 -- http://mail.python.org/mailman/listinfo/python-list