python 16进制字符串怎么转换成16进制整数?

2024-10-28 15:27:29
推荐回答(1个)
回答1:

hex_str = "0xff"
hex_int = int(hex_str, 16)
print(hex_int)#255