Arithmetic with Boolean values

Roy Smith roy at panix.com
Sun Aug 12 14:45:12 EDT 2012


In article <mailman.3208.1344795566.4697.python-list at python.org>,
 Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:

> On 12/08/2012 17:59, Paul Rubin wrote:
> >> which can be simplified to:
> >> for x in range(len(L)//2 + len(L)%2):
> >
> > for x in range(sum(divmod(len(L), 2))): ...
> >
> 
> So who's going to be first in with "and thou shalt not count to 4..."?

You, apparently.



More information about the Python-list mailing list