Situation:

We have a list of nested lists (list of matrices) that we wish to transpose.

Solution:

Utilize chain to iterate over our master list (x), flattening it, and then we iterate over the elements and return these as a transposed list element.

We can also check that an iterated element exists and meets some value requirement (here, less than 200).

from itertools import chain [[y[i] for y in list(chain.from_iterable(x)) if y[i] and y[i] < 200] for i in range(0,len(x[0][0]))]

Caveats:

Here, we are assuming that the subunits are invariable in length.