title: Behavior of key optional parameter when using sorted()
body: <pre><code>s="String"
  print(sorted(s,key=lambda x:x.upper()))
  </code></pre>
  
  <p>The output is <code>['g', 'i', 'n', 'r', 'S', 't']</code>.
  However I don't seem to understand what is happening. I would like to sort the iterable s in a way that priority is given to lower case letters and at the end come upper case letters. So that the output is <code>['g', 'i', 'n', 'r', 't', 'S']</code>.</p>