if-else
statements into a single line.if-else
statement with the ternary operator to show the difference in code length.elif
(Multiple Conditions)True
and False
are keys, and their corresponding values hold the possible outcomes.
Output:if-else
, tuples
, lists
, dictionaries
, and lambda
functions) for easy reference.