I have a list of urls that have a multiple datetime components.
urls = [ www.google.com/2018-10-26/2018-10-26T11:07:10.000Z, www.google.com//2018-10-26/2018-10-26T11:09:18.000Z]
I want to sort on it and then return the list back like this:
urls = [ www.google.com/2018-10-26/2018-10-26T11:09:18.000Z, www.google.com//2018-10-26/2018-10-26T11:07:10.000Z]
Because the first element has 2018-10-26T11:09:18.000Z it is greater than 2018-10-26T11:07:10.000Z. Is there a way to do this in a list comprehension? I am assuming this is the right path:
for url in urls:
date = url.split('/')[2]
But not sure what to do from there.