3 ms·> "lambda x : x if x else 1" I think what you're looking for is "x or 1"by banannaise 2y ago> "lambda x : x if x else 1" I think what you're looking for is "x or 1"