Hi there Stackoverflowers.
Have a question about sorting a list of lists first by a given value and then after how many times a given value is presented:
As an example I have the following list which contains the following posts [name,year,color]:
[
[fido,2012,brown],[fluffy,2018,pink],[fido,2016,yellow],[fluffy,2017,orange],[fluffy,2011,red],[minai,2018,blue]]
then I sort the list with sorted like this: list = sorted(list, key=itemgetter(1))
That gives me the list sorted after name so "fido" comes first,"fluffy" second and "minai" last but "fluffy" has occured three times, "fido" two and "minai" one time.
How can I sort the list so fluffy comes first since it appeared three times then fido with two times and lastly minai since it occured only once.
-Regards-