Python 3 liner code


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

#2

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