【发布时间】:2020-10-19 03:05:18
【问题描述】:
my_str = 'According to the teacher, "He never believed what I said. He ran away." And I think he did indeed. I tried to find him, but I could not.'
结果应该是:
['According to the teacher, "He never believed what I said. He ran away." And I think he did indeed.', 'I tried to find him, but I could not.']
在这个字符串中,我想用 .(dot) 分割它 但是,如果 .(dot) 在 " "(quotation) 中,我不想拆分它
我该如何使用re.split()?
【问题讨论】: