SyntaxFix
Write A Post
Hire A Developer
Questions
Using ternary operator:
message = "blah" if 'key1' in dict else "booh" print(message)