在python中,字符串可以像数组一样切片:
for i, c in enumerate(edi): if c == '\x1D': decimal = int(edi[i+1:i+3], 16)
int函数具有以下签名:int(str,base)