1

64 ビットの 16 進数があり、それを符号なし整数に変換したいと考えています。走る

>>> 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'
4

3 に答える 3