title: How can i sort a list of tuples by one of it's values and then the other?
body: <p>I'll get to the point,i have this:</p>
  
  <pre><code>    ocurrencias = [('quiero', 1), ('aprender', 1), ('a', 1), ('programar', 1), ('en', 1), ('invierno', 2), ('hace', 1), ('frio', 1), ('este', 1)]
  </code></pre>
  
  <p>I want to sort it by the second value of the tuples and then by their string value and then print every element to get this:</p>
  
  <pre><code>    output:invierno 2
             a 1
             aprender 1
             en 1
             este 1
             frio 1
             hace 1
             programar 1
             quiero 1
  </code></pre>
  
  <p>Don't know if i'm making it clear enough,but i'm not really proficient at english so forgive me.</p>
  
  <p>Thanks in advance</p>