I have a list within a list that is in this format:
[['39.9845450804', '-75.2089337931', 'Paved', ' ', 5.974380011873201],
['39.977111208', '-75.1326105278', 'Asphalt', '8', 3.4881723880136537],
['39.9767607107', '-75.1328155113', 'Asphalt', '20', 1.5123970222417986],
['40.089750884', '-74.9852538861', 'Paved', ' ', 4.296923142303416]]
Where the indices are latitude, longitude, type of pavement, no. of empty spots, and location in KM from my current location
I want to sort this unsorted list from the greatest to lowest by my 4-th index, which is the location in KM from my current location. You can assume that the list-within-list will will contains the same total number of data points of five.
I know to use sort() for single-dimensional lists, but I am not quite sure how to sort lists within lists.
Any assistance is appreciated.