SyntaxFix
Write A Post
Hire A Developer
Questions
Short variant:
my_var = some_value if 'my_var' not in globals() else my_var: