Leetcode Count Set Bits In Python For All Selected Lines