title: concatenating selected elements in a list of lists in python
body: <p>I have a <code>(python) list of lists</code> as below</p>
  
  <pre><code>biglist=[ ['1','123-456','hello','there'],['2','987-456','program'],['1','123-456','list','of','lists'] ]
  </code></pre>
  
  <p>I need to get this in the following format</p>
  
  <pre><code>biglist_modified=[ ['1','123-456','hello there'],['2','987-456','program'],['1','123-456','list of lists'] ]
  </code></pre>
  
  <p>I need to concatenate the <code>third element onwards</code> in each inner list.I tried to do this by using <code>list comprehensions</code>,</p>
  
  <pre><code>def modify_biglist(bigl):
      ret =[]
      for alist in bigl:
          alist[2] = ' '.join(alist[2:])
          del alist[3:]
          ret.append(alist)
      return ret
  </code></pre>
  
  <p>This does the job..but it looks a bit convoluted -having  a local variable <code>ret</code> and  using <code>del</code>? Can someone suggest something better</p>