Is is possible to return from a method in single line in python
Looking for something like this
return None if x is None
Tried abov
It is possible to write a standard "if" statement on a single line:
if x is None: return None
However the pep 8 style guide recommends against doing this:
Compound statements (multiple statements on the same line) are generally discouraged