And if you really don't need a function, you can replace it even without a lambda. :)
(number % 2 != 0)
is itself an expression that evaluates to True or False. Or even more understandable,
bool(number % 2)
which you can simplify as follows:
if number % 2: print "Odd!" else: print "Even!"
But if it is readable or not, it is probably in the eye of the beholder.
Alexander Ljungberg
source share