[Python] Short Bit Solution - Clean & Concise
python\nclass Solution:\n    def findComplement(self, num: int) -> int:\n        i = 0\n        ans = 0\n        while num > 0:\n            if (num & 1) == 0:\
```python\nclass Solution:\n    def findComplement(self, num: int) -> int:\n        i = 0\n        ans = 0\n        while num > 0:\n            if (num & 1) == 0:\n                ans |= 1 << i\n            i += 1\n            num >>= 1\n            \n        return ans\n```\n**Complexity**\n- Time: `O(logNum)`\n- Space: `O(1)`
[]