This is the closest thing to what you are looking for:

value = 'Test' if 1 == 1 else 'NoTest'

Otherwise, there isn't much else.


You can also do:

value = (1 == 1 and 'test') or (2 == 2 and 'testtwo') or 'nope!'

I prefer this way :D