Let say I have a nested list of string
lst = [['a'], ['b', 'c'], ['d', ['e', 'f']]]
I want to generate all possible combination from the nested list to something like this:
new_lst = [['a', 'b', 'd'],
['a', 'b', 'e', 'f'],
['a', 'c', 'd'],
['a', 'c', 'e', 'f']]
I have found some question that may related to my question. how to produce a nested list from two lists in python However, my question is more complicated issue.