Change list to tuple for pattern matching in xor_strings