I have 2 list of lists:
a=[['abc',2, 'cde'],
['xyz',5, 'fgh']]
b=[['abc', 'lmn', 2],
['xyz','opq',5]]
i would like to get result list of lists like that:
result = [['abc',2, 'cde'],
['abc', 'lmn', 2],
['xyz',5, 'fgh'],
['xyz','opq',5] ]
where the list result is ordered by 2nd column of the first list of lists and by third column of the second list of lists.
I cheched here: Python: sorting a list by "column" this code:
sorted(a, key=lambda x: x[0])
but it is for only one list of lists.