[Tutor] a question about list

Terry Carroll carroll at tjc.com
Fri Nov 12 00:43:20 CET 2004

On Thu, 11 Nov 2004, Max Noel wrote:

> a = [element for index, element in enumerate(a) if index not in b]

Damn, and I thought I was starting to get list comprehensions; but this is 
impenetrable to me.

That's not a criticism; more a statement on my inability to get list 

Would you mind unwrapping and explaining this a bit?  I'd like to 
understand it better.

More information about the Tutor mailing list