title: Missing 1 required positional argument - Why?
body: <p>I have written this code:</p>
  
  <pre><code>keyList=['a','c','b','y','z','x']
  letterlist=['b','c','a','z','y','x']
  
  def keyL(x, y):
      xIndex=keyList.index(x)
      yIndex=keyList.index(y)
      print(cmp(xIndex,yIndex))
      return cmp(xIndex,yIndex)
  
  
  
  print(letterlist)
  
  
  letterlist.sort(key=lambda x, y: keyL(x, y))
  print(letterlist)
  </code></pre>
  
  <p>But when I run the code, I have this error:</p>
  
  <pre><code>File "C:\Python33\prova.py", line 14, in &lt;module&gt;
      letterlist.sort(key=lambda x, y: keyL(x, y))
  TypeError: &lt;lambda&gt;() missing 1 required positional argument: 'y'
  </code></pre>
  
  <p>Why? I have written all the arguments of lambda...</p>