IINM, >>> is a right shift that preserves the value of the leftmost bit. This has the effect of keeping the sign of the number intact (i.e. negative numbers get a 1 inserted as their MSB instead of a 0).
In Python, integers can be arbitrarily big. There is no meaningful concept of a most significant bit since the number of bits is not bounded. Right shifts therefore simply shift all bits to the right and preserve the sign. So, in Python you can just use >>.
Edit:
As @Sven Marnach has pointed out, the >>> operation does the exact opposite of what I thought it did in Javascript. Thus >>> does not preserve sign, while >> appears to do so. Another interesting fact is that apparently -1>>1 is -1 and not 0 in Javascript. Needless to say, my knowledge of Javascript is really limited and I am not sure what the exact equivalent of these operators are in Python.
One options might be to explicitly limit how many bits are being used (perhaps by using ctypes.c_int) and then set the left most bit manually as desired in a user defined right shift function.
>>>are hard to Google, so please name them.)bits >>> 16 & 0xffandbits >> 16 & 0xffare the same thing as long asbitsis at least 24 bits long, due to the masking performed by the&operator. Same for the other equation. In English, these equations just extract single bytes from a larger integer field.