How to Use Conditional Expressions With NumPy where() Quiz - Real PythonThe quiz helps solidify understanding of conditional expressions in NumPy.
Using "else" in a comprehensionPython's list comprehensions don't support an else keyword, but Python provides a ternary operator for inline conditional expressions.