13/14 Just flip out : Why doesnt this work?!


#1

a = 0b11101110
ab = str(bin(a))
neg = (len(ab)-2)* "1"
bbb = "0b" + neg
some = int(bbb,2)
desired = a ^ bin(some)


#2

Hi @maameli ,

First, compute the result, then pass that to the bin function ...

desired = bin(a ^ some)
print desired