testing two lists for equality

beliavsky at aol.com beliavsky at aol.com
Thu Jun 19 21:40:07 CEST 2003

If x and y are both lists (or tuples), is the expression

(x == y)  

true if and only if len(x) = len(y) and all of the corresponding
elements in x and y are the same?

I did not see this behavior documented in "Python Essential
Reference", but it makes sense and agrees with a few experiments I

More information about the Python-list mailing list