Shortening common parts of code
Title.

In JavaScript there are things like the ternary operator to reduce code size and "improve" code quality, I'm wondering if there is much in python aside from the obvious which is lambda