我正在努力将一个文件文本的字符串分成两个独立的列。
在我把文本分成句子之后
for s in sentences:
row = s.strip()
print(row)
它在同一列中提供此输出:
['1'
"It is hands-down the best sporting museum in Australia
The kids (and dad) loved the interactive sports section
The amount of Olympic memorabilia was outstanding
Don't miss going to this iconic venue."]
['2'
"...
..."]
预期产出:
No sentences
1 It is hands-down the best sporting museum in Australia
1 The kids (and dad) loved the interactive sports section
1 The amount of Olympic memorabilia was outstanding
1 Don't miss going to this iconic venue.
2 ...
2 ...
任何人有任何想法,请帮忙!