Comprehension with two variables - explanation needed
skip.montanaro at gmail.com
Sun Nov 23 16:45:47 CET 2014
> But it breaks all the picture that I've built in my head about comps till
Note that list comprehensions are little more than syntactic sugar for for
loops. If you're having terrible writing or understanding one, especially a
compound one like your example, it can help to write it as a (nested) for
loop, then covert it (perhaps incrementally) to the list comp form.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list