Skip to main content
 首页 » 编程设计

python之为什么python输出负十六进制

2025年05月04日17wayfarer

http://docs.python.org/release/2.4.4/lib/typesseq-strings.html

表格显示无符号十六进制,我的输出是有符号的...

for a in words: # list of word 
    print '%x'%hash(a) 

还有http://codepad.org/Cvd0Bg2T

请您参考如下方法:

该文档适用于 Python 2.4。您可能使用的是更新的版本。看看newer该表的版本 - %x 现在已签名。