print(4 1) → 2 print(4 . The ternary operator is a short way of writing an if-else condition in a single line.