One of my favorite tomfooleries in Python is this:
>>> True, False = False, True
It doesn't have much practical effect, since most logical tests don't use the True and False constants directly. But it's a good way to perplex the unwary.
>>> True, False = False, True
It doesn't have much practical effect, since most logical tests don't use the True and False constants directly. But it's a good way to perplex the unwary.
if random.randint(0,1): (True,False) = (False,True)