Bit Manipulation Python Leetcode Questions