Making a list containing string sentences a 2 dimensional list
<p>In python 3, I have a list where each element of this list is a sentence string, for example</p>

<pre><code>list = ["the dog ate a bone", "the cat is fat"] 
</code></pre>

<p>How do I split each sentence string into an individual list while keeping everything in the individual list, making it a 2 dimensional list </p>

<p>For example...</p>

<pre><code>list_2 = [["the", "dog", "ate", "a", "bone"], ["the", "cat", "is", "cat"]]
</code></pre>

<p>You can use list comprehension:</p>

<pre><code>list2 = [s.split(' ') for s in list]
</code></pre>

python list dimensional