Mercurial > hg > Lemuriformes
view lemuriformes/transpose.py @ 18:56596902e9ae default tip
add some setup + tests
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 10 Dec 2017 17:57:03 -0800 |
parents | 4793f99b73e0 |
children |
line wrap: on
line source
""" transpose an 2D iterable of iterables in python """ def transpose(array, type=list): return map(type, zip(*array))