Python Number Conversion Chart

FromToExpression
45"45"str(data)
45"101101"bin(data)
45"2D"hex(data)
45"\x00\x00\x00\x2d"struct.pack('!i', data)
"45"45int(data)
"45""3435"data.encode('hex')
"101101"45int(data, 2)
"2D"45int(data, 16)
"2D""\x2d"binascii.unhexlify(data) or data.decode('hex')
"\x00\x00\x00\x2d"45struct.unpack('!i', data)[0]
"\x2d""2D"binascii.hexlify(data)
"3435""45"data.decode('hex')

0 comments

Popular Posts

无觅相关文章插件,迅速提升网站流量