Using the ternary operator in Python

using the ternary operator in Python Home / problem You’re learning Python and you came across the ternary operator. Also known as the conditional operator. This operator is helpful in cases in which we need to use a value based on some boolean logic. SOLUTION Using the if, else keywords in one sentence. For example, […]