Trying to sort by the number of identical items, from largest to smallest item count... There is an array:
[['red', 1], ['blue', 2], ['blue', 3], ['green', 4], ['red', 5], ['red', 6]]
Need output:
[['red', 1],
['red', 5],
['red', 6],
['blue', 2],
['blue', 3],
['green', 4]]
Trying with collections Counter, but i dont know how count only words... Maybe somebody can help me.