Comparisons of tuples, lists, etc, are *lexicographical*: the first items are compared; iff they're equal, then the second items, and so forth. IOW, exactly what you want in this case.
Just to check my understanding, this means that:
cmp(a0, b0) or cmp(a1, b1) or ... or cmp(aN, bN)
should give the same result as:
cmp((a0, a1, ... aN), (b0, b1, ... bN))
right?
Steve -- http://mail.python.org/mailman/listinfo/python-list