Arithmetic with Boolean values

Paul Rubin no.email at nospam.invalid
Sun Aug 12 12:59:54 EDT 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