How do I get the opposite (negation) of a Boolean in Python? February 9, 2022 by admin You can just use: return not bool