SyntaxFix
Write A Post
Hire A Developer
Questions
I think it's better to avoid the situation. It's cleaner and clearer to write:
a = None if condition: a = 42