Hi,
On 9 January 2012 12:31, Sarma Tangirala wrote:
> Given a nested list, how do I sort the uppermost list based on one key and
> when a special condition occurs a sort on another key should be performed?
>
> For example, [[1,2], [2, 2], [3, 2], [4, 0]] would be sorted, in my example
> as, [[4,
On 9 January 2012 18:26, Steven D'Aprano wrote:
> Sarma Tangirala wrote:
>
>> Hi list,
>>
>> I was banging my head about a pythonic way of doing the following,
>>
>> Given a nested list, how do I sort the uppermost list based on one key and
>> when a special condition occurs a sort on another key
Sarma Tangirala wrote:
> I was banging my head about a pythonic way of doing the following,
>
> Given a nested list, how do I sort the uppermost list based on one key and
> when a special condition occurs a sort on another key should be performed?
>
> For example, [[1,2], [2, 2], [3, 2], [4, 0]]
Sarma Tangirala wrote:
Hi list,
I was banging my head about a pythonic way of doing the following,
Given a nested list, how do I sort the uppermost list based on one key and
when a special condition occurs a sort on another key should be performed?
For example, [[1,2], [2, 2], [3, 2], [4, 0]] w
Hi list,
I was banging my head about a pythonic way of doing the following,
Given a nested list, how do I sort the uppermost list based on one key and
when a special condition occurs a sort on another key should be performed?
For example, [[1,2], [2, 2], [3, 2], [4, 0]] would be sorted, in my ex