>>> target_list = [int(x) for x in str.split(',')]>>> print target_list [2257, 4018, 1096]>>> 或者 >>> str='2257,4018,1096'>>> exec("target_list=[%s]"%str)>>> print target_list [2257 方法:list -> bytearray -> str 如:'\x53\x21\6a' -> [0x53, 0x21, 0x6A] ...