How to append lists of list into one list
<p>Mylists = [['A B','A B C','A B C D'],['C','D E F','A B']]</p>

<p>How can I get a list like: myli = [['A','B','A','B','C','A','B','C','D'],['C','D','E','F','A','B']]</p>

<p>Here is my code:</p>

<pre><code>x = []
myli = []

for item in Mylists:
    for i in range(len(item)):
        x.extend(item[i].split())
    myli.append(x)
</code></pre>

<p>Assuming that <code>mylist</code> is a list of lists of strings where words are separated by spaces:</p>

<pre><code>ml = [['A B','A B C','A B C D'],['C','D E F','A B']]
l = []
for inner in ml:
    newinner = []
    for innerstr in inner:
       for word in innerstr.split(' ')
                newinner.append(word)
    l.append(newinner)
</code></pre>

python list