Question
In python2, for the sorted and list.sort functions, what is the difference between the key argument vs the cmp argument?
Answer
key does a comparison against some derivitive of the list values being compared (e.g. len, for length) whereas cmp uses a custom functions to compare the whole of the two list items being compared (e.g. comparing release number 1.2 and 1.2.1 via a custom function)