4 ms·
There exists a ternary if statement? foo = something() if sanity_check else None Can replace None with foo (or any other expression), if desired.
by jononor 2y ago
There exists a ternary if statement?
foo = something() if sanity_check else None
Can replace None with foo (or any other expression), if desired.