📜  如何在 python 中按大小拆分字符串 - Python 代码示例

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

代码示例2
>>> x = "qwertyui"
>>> chunks, chunk_size = len(x), len(x)/4
>>> [ x[i:i+chunk_size] for i in range(0, chunks, chunk_size) ]
['qw', 'er', 'ty', 'ui']