title: Sorting a zipped object in python 3
body: <p>I've a <code>zip</code> object and I want to sort it(based on a specific key).</p>
  
  <p>I've already seen <a href="https://stackoverflow.com/questions/7142227/how-do-i-sort-a-zipped-list-in-python">How do I sort a zipped list in Python?</a> but the accepted answer does not work in python 3.6 anymore.</p>
  
  <p>For example  </p>
  
  <pre><code>In [6]: a = [3,9,2,24,1,6]
  
  In [7]: b = ['a','b','c','d','e']
  
  In [8]: c = zip(a,b)
  
  In [9]: c
  Out[9]: &lt;zip at 0x108f59ac8&gt;
  
  In [11]: type(c)
  Out[11]: zip
  
  In [12]: c.sort()
  ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-12-a21727fa8976&gt; in &lt;module&gt;()
  ----&gt; 1 c.sort()
  
  AttributeError: 'zip' object has no attribute 'sort'
  
  # Wanted this to be sorted by the first element
  In [13]: for l,r in c: print(l,r)
  3 a
  9 b
  2 c
  24 d
  1 e
  </code></pre>
  
  <p>In other words how do I make the zip iteration order conform to the sorting order. 
  I'm aware that converting a zip to a list of tuples will allow me to fix this, but I want to retain the zipped object (as it used to be in the good old days of python2.7)</p>