Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Totally unpythonic (did not use conversion to binary string) :-) solution in Clear category for Parity Bit Generator by martin_b
def checkio(message):
def parity(n):
c = 0
while n:
c += 1
n &= n - 1
return c & 1
return "".join([chr(n >> 1) for n in message if parity(n >> 1) == n & 1])
April 24, 2016
Comments: