I need to do XOR operation between two binary strings.
xor("00110011", "11001100") = "11111111"
i am currently using this function
def xor(x, y):
ans = ""
for i in xrange(len(x)):
if x[i] == "0" and y[i] == "1" or x[i] == "1" and y[i] == "0":
ans += "1"
else:
ans += "0"
return ans
please give me good method