LOL Booleans (21)

7 Name: #!/usr/bin/anonymous : 2008-03-28 00:27 ID:ck+Erga7

I don't see the problem of summing booleans. It makes perfect sense in the context of counting. sum([x%5 == 0 for x in range(100)]) would tell you how many numbers are divisible by five in the range 0 to 99 in Python (namely, 20) for example.

This thread has been closed. You cannot post in this thread any longer.