def xor(x,y): ''' computes xor of two Boolean variables, x and y ''' return (x and (not y)) or ((not x) and y) xor(True,False)