-1
のリストは、私がこのような何かを行くリストを持っていると言う:分割特定Characer
['Try not to become a man of success, but rather try to become a man of value.
\n', 'Look deep into nature, and then you will understand everything
better.\n', 'The true sign of intelligence is not knowledge but imagination.
\n', 'We cannot solve our problems with the same thinking we used when we
created them. \n', 'Weakness of attitude becomes weakness of character.\n',
"You can't blame gravity for falling in love. \n", 'The difference between
stupidity and genius is that genius has its limits. \n']
は、どのように私はすべての改行でサブリストにこのリストを分割するに行きますか? 上記の出力を希望の出力にするにはどうすればよいですか?
['Try not to become a man of success, but rather try to become a man of value.']
['Look deep into nature, and then you will understand everything better'] ['The true sign of intelligence is not knowledge but imagination.]
あなたのリスト既に分割されているようです。最初の例のコンマを見てください。リストのリストを作成したいですか? – umutto
あなたが達成したいことがわかりません。新しい行の文字 '\ n'を削除し、各要素をそれ自身のリストに変換したい場合、' '[phrase in arr]' '[phrase.strip()]' – user2829759