>>> def isodd(num): return num & 1 and True or False >>> isodd(10) False >>> isodd(9) True