Python easy 100% beats - 2595. Number of Even and Odd Bits
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def evenOddBit(self, n: int) -> List[int]:\n        val = bin(n)[2::][::-1]\n        l = [0 , 0]\n        for i in range(0 , len(val)):\n            if val[i]==\'1\':\n                if i%2:l[1]+=1\n                else:l[0]+=1\n        return l\n```
['Python3']