This is a great primer but doesn't answer what I need: http://stackoverflow.com/questions/464342/combining-two-sorted-lists-in-python
I have two Python lists, each is a list of datetime,value pairs:
list_a = [['1241000884000', 3], ['1241004212000', 4], ['1241006473000', 11]]
And:
list_x = [['1241000884000', 16], ['1241000992000', 16], ['1241001121000', 17], ['1241001545000', 19], ['1241004212000', 20], ['1241006473000', 22]]
- There are actually numerous list_a lists with different key/values.
- All list_a datetimes are in list_x.
- I want to make a list, list_c, corresponding to each list_a which has each datetime from list_x and value_a/value_x.
Bonus:
In my real program, list_a is actually a list within a dictionary like so. Taking the answer to the dictionary level would be:
dict = {object_a: [['1241000884000', 3], ['1241004212000', 4], ['1241006473000', 11]], object_b: [['1241004212000', 2]]}
I can figure that part out though.