I have couple lists of tuples like this ones:
list_1 = [('2023-01-01', 'a'), ('2023-01-02', 'b'), ('2023-01-10', 'c')]
list_2 = [('2023-01-02', 'd'), ('2023-01-05', 'e'), ('2023-01-07', 'f')]
list_3 = [('2023-01-01', 'g'), ('2023-01-03', 'h'), ('2023-01-10', 'i')]
I need to fill in the missing dates with None value for each of the lists:
list_1 = [('2023-01-01', 'a'), ('2023-01-02', 'b'), ('2023-01-03', None), ('2023-01-05', None), ('2023-01-07', None), ('2023-01-10', 'c')]
list_2 = [('2023-01-01', None), ('2023-01-02', 'd'), ('2023-01-03', None), ('2023-01-05', 'e'), ('2023-01-07', 'f'), ('2023-01-10', None)]
list_3 = [('2023-01-01', 'g'), ('2023-01-02', None), ('2023-01-03', 'h'), ('2023-01-05', None), ('2023-01-07', None)('2023-01-10', 'i')]
The number of tuple elements can vary.
What is the best and most efficient solution to do this ?