hmm, maybe you're right.  I certainly agree that your example is nested and 
mine is not.  I wonder what the exact description of Kent's solution is?


----- Original Message ----
From: Luke Paireepinart <[EMAIL PROTECTED]>
I don't think this is a 'nested list comprehension.'

I think that would be 

c = 'Hello, World!'

[a for a in [b for b in c]]

in other words: a list comprehension inside of a list comprehension.

 

Whereas this example is a single list comprehension because it only builds one 
list, despite having multiple 'for' loops.

-Luke







__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to