How to sort a list of lists of lists by the number of items? Python
I have a list:
[[['4', '10'], ['2', '6'], ['1', '3']], [['1', '4', '10'], ['5', '2', '6'], ['11', '1', '3']]]
I want to sort by the total number of items. The firts group has the item 4, 10, 2, 6, 1 and 3, in total, 6 item. The second has 1, 4, 10, 5, 2, 6, 11, 1 and 3, in total, 9 elements. So I want the second group to come before the firts one:
[[['1', '4', '10'], ['5', '2', '6'], ['11', '1', '3']], [['4', '10'], ['2', '6'], ['1', '3']]]
(the list has lots more groups, this is just a shoter version of the problem)
Python List sort by price
I have a Python list called “products”
I am attempting to sort it by price (cheapest first), but I can not figure out how to reference the values after the $ to begin sorting.
Custom sort list in Python
There are a number of files in a folder like this: