"monty" < "python"
Jan Oelze
jan at codein.is
Wed Mar 20 09:38:23 EDT 2013
From the docs[0]:
"Strings are compared lexicographically using the numeric equivalents (the result of the built-in function ord()) of their characters. Unicode and 8-bit strings are fully interoperable in this behavior."
[0] http://docs.python.org/2/reference/expressions.html#not-in
On 20.03.2013, at 14:33, franzferdinand <melo.dumoulin at hotmail.com> wrote:
>>>> "Monty" < "Python"
> True
>>>> "Z" < "a"
> True
>>>> "Monty" < "Montague"
>
> False
> What's the rule about that? Is it the number of letters or what?
> thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130320/ead834ee/attachment.html>
More information about the Python-list
mailing list