I have a different case of list Flattening.
Suppose I have a list of list ,say l=[['a'],[['p','l']]] . I simply want ['a',['p','l']]. That is the single elements should not be in nested lists and the lists having more than one element can be nested twice.
Thanks