6 ms·
Additionally to the provided answers: if sanity_check(): variable = something() variable = sanity_check() and something (but the standard python two line way
by c6401 2y ago
Additionally to the provided answers:
if sanity_check(): variable = something()
variable = sanity_check() and something
(but the standard python two line way is more readable unless it's a throwaway single use code, then whatever)