Re: [Tutor] understanding the behavious of parameter 'key' in sort

2009-11-24 Thread Shashwat Anand
it was a bit tricky, thanks :) On Tue, Nov 24, 2009 at 9:00 AM, Lie Ryan wrote: > Shashwat Anand wrote: > >> I intended to sort a list which sorts according to user-defined custom >> sorting-order. >> For example: If sorting-order is "zabc...wxy", then the output will be in >> lexicographically

Re: [Tutor] understanding the behavious of parameter 'key' in sort

2009-11-23 Thread Lie Ryan
Shashwat Anand wrote: I intended to sort a list which sorts according to user-defined custom sorting-order. For example: If sorting-order is "zabc...wxy", then the output will be in lexicographically sorted order but z will always be given priority over rest others. as a test case i took sortin

[Tutor] understanding the behavious of parameter 'key' in sort

2009-11-23 Thread Shashwat Anand
I intended to sort a list which sorts according to user-defined custom sorting-order. For example: If sorting-order is "zabc...wxy", then the output will be in lexicographically sorted order but z will always be given priority over rest others. as a test case i took sorting order as reverse of norm