Sug*_*ara 3 python bit-manipulation
如何将返回值截断为32位?我有以下代码,
def rotate_left(input, shift):
return hex((input << shift) | (input >> (32 - shift)))
Run Code Online (Sandbox Code Playgroud)
我希望返回值是
"0x000000A"而不是"0xA0000000A"打电话时rotate_right(0xA000000)