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
On Thu, Feb 25, 2010 at 7:30 AM, mk 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
mk wrote:
> Hello everyone,
>
> I have stumbled upon this seemingly trivial problem: the answer is not
> there in http://www.python.org/doc/faq/programming/, and googling does
> not return many references really (at least for me).
>
> I have come up with this:
>
> def qips_identical(q, oldq):
>
mk wrote:
> I have stumbled upon this seemingly trivial problem: the answer is not
> there in http://www.python.org/doc/faq/programming/, and googling does
> not return many references really (at least for me).
>
> I have come up with this:
>
> def qips_identical(q, oldq):
> qips = map(ope
Hello everyone,
I have stumbled upon this seemingly trivial problem: the answer is not
there in http://www.python.org/doc/faq/programming/, and googling does
not return many references really (at least for me).
I have come up with this:
def qips_identical(q, oldq):
qips = map(operator.it