To check for odd and even integer, is the lowest bit checking more efficient than using the modulo?
>>> def isodd(num): return num & 1 and True or False >>> isodd(10) False >>> isodd(9) True