new_contents: class Solution(object):
      def hammingWeight(self, n):
          """
          :type n: int
          :rtype: int
          """
          res = 0
          while n:
              res += n & 1
              n = n >> 1
          return res
  
subject: Create Numberof1Bits_002.py