I would appreciate some help with a python piece of code im having issues with.
I have a list which contains strings. Here is a snippet of the list. It is a lot longer though.
[['AAPL', '1d', '58.82', '155.04'], ['MSFT', '1d', '63.16', '118.6']]
What i am trying to do is to sort the list at index 3 (so the values '155.04' , '118.6' etc). I have tried the following, which doesn't work since i have floats as string i presume.
sorted(list, key=itemgetter(3), reverse=True)
I've looked into using sort() and sorted() but i cant seem to find a way to both sort ints as strings and also at a particular index.There are no error messages, its just not in the correct order.