1# >> and << are bitwise operators. They shift the bits of an integer right and left
2# 7 = 0111
3print(7 >> 1)
4# 3 (0011)
5
6print(7 << 1)
7# 14 (1110)
1#PYTHON BITWISE OPERATORS
2OPERATOR DESCRIPTION SYNTAX FUNCTION IN-PLACE METHOD
3& Bitwise AND a & b and_(a, b) __and__(self, other)
4| Bitwise OR a | b or_(a,b) __or__(self, other)
5^ Bitwise XOR a ^ b xor(a, b) __xor__(self, other)
6~ Bitwise NOT ~ a invert(a) __invert__(self)
7>> Bitwise R shift a >> b rshift(a, b) __irshift__(self, other)
8<< Bitwise L shift a << b lshift(a, b) __lshift__(self, other)
1a = 1
2b = 2
3
4if a != b:
5 print("Dunno")
6
7if a <> b:
8 print("Dunno")
9
10
11above mentioned code are same As described in the documentation,
12they are the same. <> is deprecated and was removed in Python 3,
13so you should use !=
14
15https://docs.python.org/2/reference/expressions.html#not-in