How To Calculate Bitwise And In Python Syntax For If Statement