3 ms·
it's a very small thing, but the booleans in python can be added like integers, with True being 1 an False being 0. So your comprehension could have been:
by camel_Snake 4y ago
it's a very small thing, but the booleans in python can be added like integers, with True being 1 an False being 0. So your comprehension could have been:
s = sum(i % 3 for i in range(1, 10\*8, 2))