Diez B. Roggisch wrote: > Maric Michaud wrote: > >> Le Mardi 20 Juin 2006 12:09, Diez B. Roggisch a écrit : >>> [i for i, equals in enumerate((x == y for x, y in zip(a, b))) if equals] >> No needs to nest comprehensions, should be : >> [ i for i, v in enumerate(zip(a, b)) if v[0] == v[1] ] > > You're right, that design stemmed from my first broken version.
Or even deconstruct to avoid the (very mildly confusing) v[0], v[1]: [i for i, (left, right) in enumerate(zip(a, b)) if left == right] -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list