Python 3 liner code

def addBinary(self, A, B):
    C = '{:032b}'.format(A+B)
    return (C.lstrip('0'))


dude you just wasted your time if you implemented just this. one should definitely know this solution and probably should use it in coding tests but for practice this solution doesn’t give you anything. I hope you implement the solution with no inbuilt function too and have just posted it here for people who don’t know much about python. BTW if you are using inbuilt function to do the heavy lifting then atleast reduce your code to one line