On 19/02/2012 01:31, Bill Allen wrote:
Generally speaking, are list comprehensions more efficient that the
equivalent for loop with interior conditionals for a given task? Do they
compile down to the same Python byte code?
Thanks,
Bill Allen
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Use the timeit module to answer Q1 and the dis module to answer Q2.
--
Cheers.
Mark Lawrence.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor