how to add ternary operator in python code example
Example 1: python ternary
a if condition else b
Example 2: python turnary
is_nice = True
state = "nice" if is_nice else "not nice"
a if condition else b
is_nice = True
state = "nice" if is_nice else "not nice"