def addBinary(self, A, B):
a = int(A,2)
b = int(B,2)
C = bin(a+b).replace('0b','') return C
Since there is no limit on the size of integer in python int works fine so as bin and these can be implemented easily by any user if he/she doesn’t want to use the predefined functions .