硬编码行不?
# -*- coding: cp936 -*-para = '20133233'new_para = ''if not len(para)%2: print para for i in range(0,len(para),2): new_para= new_para + "\\x"+para[i:i+2]else: print '字符串位数不正确!'print new_para