To check for odd and even integer, is the lowest bit checking more efficient than using the modulo?
>>> def isodd(num): return num & 1 a
"return num & 1 and True or False" ? Wah! If you're speed-crazy (1) "return num & 1" (2) inline it: if somenumber % 2 == 1 is legible AND beats isodd(somenumber) because it avoids the Python function call.
if somenumber % 2 == 1
isodd(somenumber)