myfunction(lambda x: print 'Eat %s!' % x) and that would print 'Eat this!'.
Ahm... :)You can't use print in lambda as it is a statement, not an expression (in python 2.x at least)
myfunction(lambda x: print 'Eat %s!' % x) and that would print 'Eat this!'.
Ahm... :)You can't use print in lambda as it is a statement, not an expression (in python 2.x at least)