On Fri, Jun 8, 2012 at 10:43 AM, Emile van Sebille <em...@fenx.com> wrote: > Or alternately by leveraging true/false as 1/0: > >>>> [ 100*(not(ii%2))+ii for ii in range(10)]
The same thing, leaving bools out of it altogether: >>> [100*(1-ii%2)+ii for ii in range(10)] -- http://mail.python.org/mailman/listinfo/python-list