把16进制字符串转成带符号10进制 代码: def hex_to_dec(hex_str): # 把16进制字符串转成带符号10进制 if hex_str[0] in '0123456789': dec_data = int(hex_str, 16) else