I am making an TF2 backpack viewer in Python, and I have inventory token that is an 32 unsigned long. First 16 bits are unimportant for me. Usual approach in C would be something like
(a<<16)>>16
to get last 16 bits. But Python is no C, and it above operation will not work. How do I specify that Python SHOULD use int32 for this variable?
You can use bitwise AND operator (
&
):