title: Python sorting 2D Array of tuples in python
body: <p>I'm new to python and have an array, where each element is an array of tuples. I need to sort the tuples in the inner array by the first element in the tuple. My array looks something like this:</p>
  
  <pre><code>[[(u'10:30', u'11:20'), (u'08:30', u'09:20')], [(u'14:30', u'15:50'), (u'10:00', u'11:20'), (u'10:30', u'11:20'), (u'13:00', u'14:20')], [(u'10:30', u'11:20'), (u'08:30', u'09:20')], [(u'14:30', u'15:50'), (u'10:00', u'11:20'), (u'13:00', u'14:20')], [(u'10:30', u'11:20'), (u'08:30', u'09:20')]]
  </code></pre>
  
  <p>I tried doing something like</p>
  
  <pre><code>for index, elm in array:
      array[index] = sorted(elm, key=lambda x: x[0])
  </code></pre>
  
  <p>But I get the ValueError: need more than 0 values to unpack. Not sure if my syntax is off or something</p>
  
  <p>The expected result is</p>
  
  <pre><code>  [[ (u'08:30', u'09:20'), (u'10:30', u'11:20')], [ (u'10:00', u'11:20'), (u'10:30', u'11:20'), (u'13:00', u'14:20'), (u'14:30', u'15:50')], [(u'08:30', u'09:20'),(u'10:30', u'11:20') ], [ (u'10:00', u'11:20'), (u'13:00', u'14:20'), (u'14:30', u'15:50'),] [ (u'08:30', u'09:20'), (u'10:30', u'11:20')]]
  </code></pre>