When I call this function:
def check_bit4(input):
mask = "0b010"
desired = input & mask
if desired > 0:
return "on"
else:
return "off"
This error appears:
Traceback (most recent call last):
File "python", line 9, in <module>
File "python", line 3, in check_bit4
TypeError: unsupported operand type(s) for &: 'int' and 'str'
I searched, but did not find a solution to the error