classSolution:""" @param a, b: Two integer return: An integer """defbitSwapRequired(self,a,b):# write your code hereresult=0# if a<0, then a's binary is 2^32 - abs(a)ifa<0:a=2**32+aifb<0:b=2**32+bwhilea!=0orb!=0:ifa%2!=b%2:result+=1a/=2b/=2returnresult