In the function below, the variable type of "input" is integer. The function performs an operation on "input," which is an integer, and "mask," which is a... what? Is it a string, unicode, or binary? If "mask" is not an integer, how does Python know to convert "input" to a different variable type? Is it because "mask" is binary or because & is a binary operator?
def check_bit4(input): mask = 0b1000 if input & mask > 0: return "on" else: return "off"