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)
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)
No comments yet.