I have a boolean variable named mapped_filter
.
If I am not wrong, this variable can hold 3 values, either True
, False
or None
.
I want to differentiate each of the 3 possible values in an if
statement. Is there a better way to achieve that than doing the following?
if mapped_filter:
print("True")
elif mapped_filter == False:
print("False")
else:
print("None")