Light Mode
Dark Mode
Combining?

So I can use: newlist = sorted(items, key =items.count, reverse = True) Which doesn't group them by index, or I can use: newlist = sorted(items, key =lambda x: (items [x], x), reverse = True) Which groups everything, but not by frequency. What is the easiest way to combine the two? Someone suggested trying to index them, but since I don't have much experience in python, it becomes all guess and check.

Created: Feb. 5, 2020, 9:40 p.m.
Updated: Feb. 9, 2020, 1:51 p.m.
1
5
User avatar
Noith