title: Remove outer list from list of list in python
body: <p>I have a requirement in which I want to pass a set of lists separated by comma to a function.</p>
  
  <pre><code>searchTerms = ["a", "c", "d"]
  
  stringList = ['a', 'b', 'c', 'd', 'a']
  
  d = dict()
  
  for j in range(len(searchTerms)):
  
      for i in range(len(stringList)):
  
          if searchTerms[j] == stringList[i]:
  
              d.setdefault(j, []).append(i)
  
  print d.values()
  </code></pre>
  
  <p>if you run the above code the output will be <code>[[0, 4], [2], [3]]</code> but i need to pass <code>[0, 4], [2], [3]</code> to a function. Could anyone tell me how can I remove the outer list from here.</p>
  
  <p>In short convert <code>[[0, 4], [2], [3]]</code> <code>------&gt;</code> <code>[0, 4], [2], [3]</code>. Thanks</p>
  
  <p>I want to send it to this function:</p>
  
  <pre><code> for element in itertools.product([0, 4], [2], [3]):
  
      sortedList = sorted(list(element))
  </code></pre>