首页 > TAG信息列表 > 0xE9

python 格式化文本输出十六进制数据

f = open("D:\\hex_out.mot", 'r') #str = f.write("3434") out_str1 = '0x' Input_str = f.readline() Str_num = len(Input_str); Str_num = Str_num -1; Arry_size = Str_num//2 out_str1 = out_str1 + Input_str[0] + Input_st