title: Sort by elements of a list of tuples
body: <p>I have a list of tuples or a tuple of tuples and I want to swap the tuples like in the next example:</p>
  
  <pre><code>&gt;&gt;&gt; swap([('abc', 'bcd'), ('efg', 'zza')])
  [('efg', 'zza'), ('abc', 'bcd')]
  </code></pre>
  
  <p>I want to swap the tuples from the list based on the third character of the second element of every tuple.</p>