def parity(x): x = list(x) if len(x) == 0: return [] bits = 0 while (1<