I have a list looking like this:
List = [
(0, "26-02-2019", 4),
(1, "04-03-2019", 12),
(2, "20-01-2019", 3),
(3, "11-04-2019", 9),
]
I need to order them in terms of the date, in index position 1.
If it helps, to convert into the normal datetime format I can use datetime.datetime.strptime(i[1], '%d-%m-%Y') when I use a for loop.
Q: Is it possible to do a merge sort on this type of data? If so, how?
EDIT: Stop marking as duplicate - my question is to MERGE SORT not using .sort(key=lambda x: datetime.datetime.strptime(x[1], '%d-%m-%Y'))