擅长:python、mysql、java
<p>如果不想以列表结束,则应使用<strong>extend()</strong></p>
<pre><code> file = open("love_life.txt", "r")
list_of_sentences = []
for line in file:
new = line.split('.')
list_of_sentences.append(new)
file.close()
print(list_of_sentences)
</code></pre>