我有以下形式的数据:
<a> <b> <c> <This is a string>
<World Bank> <provides> <loans for> <"a Country's Welfare">
<Facebook> <is a> <social networking site> <"Happy Facebooking => Enjoy">
现在我想根据分隔符 <> 分割上面给出的每一行。那就是我想拆分为:
['<a>', '<b>', '<c>', '<This is a string>']
['<World Bank>', '<provides>', '<loans for>', '<"a Country\'s Welfare">']
['<Facebook>', '<is a>', '<social networking site>', '<"Happy Facebooking => Enjoy">']
我尝试根据空格和“>”进行拆分,但它不起作用。python中是否有其他方法可以按照上述方式进行拆分。由于我的文件大小为 1 TB,因此我无法手动执行此操作。