On 2010-02-25 14:55, Arnaud Delobelle wrote:

Your code checks if the two lists have the same length and the same
elements, but not necessarily the same number of each elements. E.g.

     qips = [1, 1, 2]
     oldqips = [1, 2, 2]

will return True

If you want to check if each value has the same number of occurences,
you can do

     return sorted(qips) == sorted(oldqips)

assuming that all elements in the lists are comparable.

Thanks!

Regards,
mk

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to