Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "lambda x : x if x else 1"

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: