On Thu, Feb 25, 2010 at 7:30 AM, mk <mrk...@gmail.com> wrote: > There's a number of complications here, depending on definition of 'lists > with identical values', like whether the same value can be repeated > different number of times in two lists, or whether the order of values > matters. >
Order and repetitions matter: list1 == list2 Repetition matters, order does not: sorted(list1) == sorted(list2) # items must be comparable Neither matters: set(list1) == set(list2) # items must be hashable -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-- http://mail.python.org/mailman/listinfo/python-list