I am teaching myself python from Mike McGrath's 'python in easy steps' book. On the section talking about bitwise operators (| , &, ~, ^, >>, <<) it has you doing some moving of bits around. But when I try to use then tilde ~ I get a syntax error. But not for any of the other operators. Can someone please help a beginer and tell me what I'm doing wrong?
a = 10
b = 5
print('a =', a, '\tb=', b)
b = a ~ b
a = a ^ b
print('a=', a, '\tb=', b)