13/14 _ Binary String error


#1

My answer below is outputting what I believe to be the correct binary string of "0b11111111", but I keep receiving the error:

“Oops, try again. Make sure your answer is a binary string.”

a = 0b11101110
mask = 0b00010001
print bin(a ^ mask)

Is this a bug, or more likely - how am I specifically being a moron in this instance? :smile:


#2

Your mask must be 0b11111111 to flip all the bits.


#3

Thank you kindly, so it turns out I was being a moron.