Tagged: Python Ternary

ternary operator in python

Ternary Operator in Python with Examples

Python’s if-else statements are very easy to write and read. But they come with a downside. That is, if you want to print something based on some condition, you need 4 lines to do...