【发布时间】:2022-01-18 13:52:25
【问题描述】:
我有这样的列表。
list = ['As Michael Harvey writes, paragraphs are “in essence—a form of punctuation, and like other former. ',
'',
'Many novice writers tend to make a sharp distinction between content and style, thinking that a paper can be strong']
我们可以观察到有一个空列表''。我想根据空列表拆分我的列表。
预期输出:
#输入
input_list = ['some text ', '', 'some texts example']
输出:
list1 = ['some text ']
list2 = ['some text example']
【问题讨论】:
-
是否需要扩展到 x 个输出列表?
-
您需要将输出作为列表列表吗?