I was writing some lambda functions and couldn\'t figure this out. Is there a way to have something like lambda x: x if (x<3) in python? As lambda a,b: a i
lambda x: x if (x<3)
lambda a,b: a i
What's wrong with lambda x: x if x < 3 else None?
lambda x: x if x < 3 else None