python扁平化界面,如何在python中扁平化列表列表
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...