The ternary conditional operator is a short-hand method for writing an if/else statement.
Does Python Have a Ternary Conditional Operator? Yes, it does.
This remids me that Eiffel, at least “ISE Eiffel” does actually have conditional expressions that are the same: answer := if time < noon then
"Good morning"
else "Good afternoon"
end