Added Python implementation of xor using the same api.