We can do the AND operations using & operator.
&
24 & 72 0x18 & 0x48 # 8 # Binary representation bin(24 & 72) # '0b1000'