On 09/28/10 13:57, Bill Allen wrote:
> I can now see that quite a bit of the code I write dealing with lists
> can be done with list
> comprehensions.   My question is this, is the list comprehension styled
> code generally
> more efficient at runtime?  If so, why?

Yes, because the looping in list comprehension is done in C instead of a
python construct. However, they are the type of efficiency that you
shouldn't bother yourself with unless you're microoptimizing.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to