📜  python 在索引处拆分 - Python 代码示例

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

代码示例2
In [42]: s = "Hello there!"

In [43]: [s[v1:v2] for v1, v2 in zip([0]+l, l+[None])]
Out[43]: ['He', 'llo ', 'the', 're!']