def bitSwapRequired(self, a, b):
        """

        :param a:
        :param b:
        :return: int
        """
        a = self.to_bin(a)
        b = self.to_bin(b)
        diff = len(a)-len(b)
        ret = 0
        if diff<0:
            a, b = b, a
            diff *= -1
        b = "0"*diff+b
        for i in xrange(len(b)):
            if a[i]!=b[i]:
                ret += 1

        return ret
dataset/ETHPy150Open algorhythms/LintCode/Convert Integer A to Integer B.py/Solution.bitSwapRequired/original