I'm new to Python and I'm trying to use ternary opertor which has this format (I think so)
value_true if <test> else value_false
Here's a snippet of code:
expanded = set()
while not someExpression:
continue if currentState in expanded else expanded.push(currentState)
# some code here
But Python doesn't like it and says:
SyntaxError: invalid syntax (pointed to if)
How to fix it?