case-insensitive alphabetical sorting of nested lists
<p>i'm trying to sort this nested list by inner's list first element:</p>

<pre><code>ak = [ ['a',1],['E',2],['C',13],['A',11],['b',9] ]
ak.sort(cmp=lambda x, y: cmp(x[0], y[0]))
for i in ak: {
 print i
}
</code></pre>

<p>by default python considers A > a, hence the output i get is:</p>

<pre><code>['A', 11] ['C', 13] ['E', 2] ['a', 1] ['b', 9]
</code></pre>

<p>i've tried converting all list values to even case during comparison by adding x[0].lower etc. but no use. How do i force python (i'm working on 2.4 version) to do case-insensitive alphabetical sorting?</p>

<p><strong>Edited:</strong></p>

<blockquote>
  <p>Jarret and Brian, your
  assumptions about parenthesis were
  right! I did forget to put them in! And Jarret, your suggestions about not using "cmp" works like a charm! Thanks a lot guys!</p>
</blockquote>
