From: Michael S. <mi...@st...> - 2009-05-15 13:02:55
|
Zhang Huangbin wrote: > >>> cmp=lambda x,y: cmp(x[0].lower(), y[0].lower()) > > >>> alist.sort(cmp) Ouch! One should probably not mask the standard function name cmp. So try this: mycmp=lambda x,y: cmp(x[0].lower(), y[0].lower()) alist.sort(mycmp) Ciao, Michael. |