Yes there is one but you are facing the difficulty because the sytax is not similar to other languages like C, Java etc. and this is the reason the syntax mentioned below is not liked by many programmers.
So it goes like this
# val1 if expr else val2
>>> y = 1
>>> x = 1 if y==2 else 2
>>> 'true' if True else 'false'
>>> 'true' if False else 'false'
Official docs - https://docs.python.org/3/reference/expressions.html#conditional-expressions