For the following sample:
def fuctionName(int, bool): if int in range(...): if bool == True: return False else: r
Another way to achieve the same outcome, which I found useful for a pandas dataframe.
As suggested below by mousetail:
bool(1 - False) bool(1 - True)