Basically what I am trying is seeing if I can flatten down nested lists when the list contains 1 single item which is another list. For example take this data structure:
[['a', 'b', 'c', [['d', 'e', 'f']]]]
The ideal format of the data would be:
['a', 'b', 'c', ['d', 'e', 'f']]
This nesting can go any amount of levels deep but just need to flatten out single list data. Anyone know a way of doing this? The closest I got with answers on SO was: Flattening a list recursively But this completely flattens the list as a whole.