I've seen a couple answers on how to flatten lists of the form
[1,[1,2],[3]]
print list(itertools.chain(*[1,[1,2],[3]]))
but how do you flatten lists like this:
[[1],[[1,2],[3]]]
print list(itertools.chain(*[[1],[[1,2],[3]]]))
[1, [1, 2], [3]]