Arithmetic with Boolean values

Paul Rubin no.email at nospam.invalid
Sun Aug 12 18:59:54 CEST 2012


> which can be simplified to:
> for x in range(len(L)//2 + len(L)%2):

for x in range(sum(divmod(len(L), 2))): ...


More information about the Python-list mailing list