I have two lists time_list
with datetime and name_list
with names mapped to each other respectively.
time_list = [datetime.datetime(2020, 3, 28, 18, 49, 36, tzinfo=tzutc()),
datetime.datetime(2020, 3, 28, 18, 54, 53, tzinfo=tzutc()),
datetime.datetime(2020, 3, 28, 19, 5, 28, tzinfo=tzutc()),
datetime.datetime(2020, 3, 28, 18, 59, 56, tzinfo=tzutc()),
datetime.datetime(2020, 3, 28, 18, 55, 42, tzinfo=tzutc())]
name_list = [a,b,c,d,e]
How to find the which name_list
has the most recent time in the time_list
?
In above example:
time_list[2]
has the most recent w.r.t name_list[2]
Expected output:
most_recent_name_list = ['c']