You are viewing a single comment's thread. Return to all comments →
def theGreatXor(x): return sum([1 << i if b == '0' else 0 for i, b in enumerate(bin(x)[:1:-1])])
Seems like cookies are disabled on this browser, please enable them to open this website
The Great XOR
You are viewing a single comment's thread. Return to all comments →