# Ternary operator in Python

There is no ternary operator in Python, but you can do this:

myvar = a if condition else b