Re: [Tutor] custom comparator with ordered list

2017-06-26 Thread Mats Wichmann
On 06/26/2017 10:38 AM, Anish Kumar wrote: > >> anish singh wrote: >> >>> I need a custom comparator. >>> >>> dictionary = {a:[b,c], d:[e,f]} >>> >>> If both 'b' and 'e' belong to the same bin if would help alot if your problem statement included a description of what "same bin" is. > Well no, t

Re: [Tutor] custom comparator with ordered list

2017-06-26 Thread Peter Otten
Anish Kumar wrote: > >> anish singh wrote: >> >>> I need a custom comparator. >>> >>> dictionary = {a:[b,c], d:[e,f]} >>> >>> If both 'b' and 'e' belong to the same bin >>> then it should be compared based on 'c' and 'f'. >>> >>> However, I want to also represent the result of the >>> sorted

Re: [Tutor] custom comparator with ordered list

2017-06-26 Thread Anish Kumar
> anish singh wrote: > >> I need a custom comparator. >> >> dictionary = {a:[b,c], d:[e,f]} >> >> If both 'b' and 'e' belong to the same bin >> then it should be compared based on 'c' and 'f'. >> >> However, I want to also represent the result of the >> sorted operation in a ordered dictionary

Re: [Tutor] custom comparator with ordered list

2017-06-26 Thread Peter Otten
anish singh wrote: > I need a custom comparator. > > dictionary = {a:[b,c], d:[e,f]} > > If both 'b' and 'e' belong to the same bin > then it should be compared based on 'c' and 'f'. > > However, I want to also represent the result of the > sorted operation in a ordered dictionary as order is >

[Tutor] custom comparator with ordered list

2017-06-26 Thread anish singh
I need a custom comparator. dictionary = {a:[b,c], d:[e,f]} If both 'b' and 'e' belong to the same bin then it should be compared based on 'c' and 'f'. However, I want to also represent the result of the sorted operation in a ordered dictionary as order is important. My custom comparator is som