我正在努力将文件文本的字符串拆分为两列。 在我把课文分成句子之后
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 ...
任何人有任何想法,请帮助!你知道吗
听起来像是,得到了
sentences
类似于:那就试试:
相关问题 更多 >
编程相关推荐