📜  python 拆分字符串大小 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:38.975000             🧑  作者: Mango

代码示例3
some_string="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
x = 3 
res = [some_string[y - x:y] for y in range(x, len(some_string) + x, x)]
print(res)