comparing two arrays

Sheldon shejo284 at gmail.com
Tue Jun 20 05:23:44 EDT 2006


Diez B. Roggisch skrev:

> Diez B. Roggisch wrote:
>
> > print [i for i, _ in enumerate((None for v in zip(a, b) where v ==
> > (1,1)))]
> >
> > should give you the list of indices.
>
> I musunderstood your question. Use
>
>
> print [i for i, _ in enumerate((None for x, y in zip(a, b) where x == y))]
>
> instead.
>
> Diez

Hi Diez,

I wish I say that I understood what you wrote here but I can't.
Do you mind explaining a little more?

/sheldon




More information about the Python-list mailing list