我有一个 64 位十六进制数,我想将其转换为无符号整数。我跑
>>> a = "ffffffff723b8640"
>>> int(a,16)
18446744071331087936L
那么数字末尾的“L”是什么?
使用以下命令也无济于事
>>> int(a,16)[:-1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'long' object is unsubscriptable
>>> int(a,16).rstrip("L")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'long' object has no attribute 'rstrip'