i am new to programming in python...i want to make XOR between 2 blocks here is my code
def XorBlock(block1, block2):
l = len(block1);
if (l != len(block2)):
raise ValueError, "XorBlock arguments must be same length"
return [(block1[j]+block2[j]) % 2 for j in xrange(l)];
but when i call it gives me
TypeError: not all arguments converted during string formatting
so please anyone help me where is the bug in this code..thanks in advance