Lambda, jeśli nic nic Python
lambda x: x if (x<3) else None
Magnificent Mole
lambda x: x if (x<3) else None