flatten
[item for sublist in l for item in sublist]
http://stackoverflow.com/questions/952914/making-a-flat-list-out-of-list-of-lists-in-python
defaultdict(list)
http://stackoverflow.com/questions/10664856/make-dictionary-with-duplicate-keys-in-python
set().union(*list)
http://stackoverflow.com/questions/2151517/pythonic-way-to-create-union-of-all-values-contained-in-multiple-lists
Recommended Posts