The ternary operator is the operator that is used to show conditional statements in Python. This consists of the boolean true or false values with a statement that has to be checked.
Syntax:
[on_true] if [expression] else [on_false]x, y = 10, 20 count = x if x < y else y
Explanation:
The above expression is evaluated like if x