Leetcode Count Set Bits In Python