Hacker News new | ask | show | jobs
by banannaise 430 days ago
> "lambda x : x if x else 1"

I think what you're looking for is "x or 1"