What is the ternary operator in Python?
I’ve heard that Python has an operator called ternary operator but I don’t know how to use it. What does the ternary operator do? The Python ternary operator (or conditional expression) works on three operands and allows to write the logic of an if else statement in a single line of code. With the ternary … Read more