On Sunday, August 2, 2015 at 12:32:25 AM UTC+2, Cameron Simpson wrote: > Fine. This also eliminates any solution which just computes a hash.
Exactly. > Might I suggest instead simply starting with the leftmost element in the > first > list; call this elem0. Then walk the second list from 0 to len(list2). If > that > element equals elem0, _then_ compare the list at that point as you suggested. > > Is there an aspect of this which doesn't work? The problem is: When I compute a hash over list1 (in its canonical form), I do not yet know list2 (or list3, or listN...) against which they will be compared later.. Lukas -- https://mail.python.org/mailman/listinfo/python-list