extract from a list of lists
<p>How can I extract elements in a list of lists and create another one in python. So, I want to get from this:</p>

<pre><code>all_list = [['1 2 3 4','2 3 4 5'],['2 4 4 5', '3 4 5 5' ]]
</code></pre>

<p>a new list like this:</p>

<pre><code>list_of_lists = [[('3','4'),('4','5')], [('4','5'),('5','5')]]
</code></pre>

<p>Following is what I did, and it doesn't work.</p>

<pre><code>for i in xrange(len(all_lists)):
   newlist=[]
   for l in all_lists[i]:
      mylist = l.split()
      score1 = float(mylist[2])
      score2 = mylist[3]
      temp_list = (score1, score2)
      newlist.append(temp_list)
   list_of_lists.append(newlist)
</code></pre>

<p>Please help. Many thanks in advance.</p>
