I\'m using itertools.chain to \"flatten\" a list of lists in this fashion:
uniqueCrossTabs = list(itertools.chain(*uniqueCrossTabs))
how is
It splits the sequence into separate arguments for the function call.
>>> def foo(a, b=None, c=None): ... print a, b, c ... >>> foo([1, 2, 3]) [1, 2, 3] None None >>> foo(*[1, 2, 3]) 1 2 3 >>> def bar(*a): ... print a ... >>> bar([1, 2, 3]) ([1, 2, 3],) >>> bar(*[1, 2, 3]) (1, 2, 3)