【发布时间】:2012-10-23 13:04:34
【问题描述】:
可能重复:
How do you split a list into evenly sized chunks in Python?
Split string by count of characters
我有一个字符串(十六进制),类似于:
717765717777716571a7202020
我需要把它变成格式:
0x71,0x77,0x65,0x71,0x77,0x77...
我不确定最好的方法是什么
【问题讨论】:
-
可以像访问普通列表一样访问字符串,因此该问题的所有答案也将回答这个问题。