[lang-ref] ( list_transpose ) ( python )

def test_list_transpose():
    # map(list, zip(*items))
    items = [
        [11, 12, 13],
        [21, 22, 23],
        [31, 32, 33],
        [41, 42, 43],
    ]
    expected = [
        [11, 21, 31, 41],
        [12, 22, 32, 42],
        [13, 23, 33, 43],
    ]

    actual = list(map(list, zip(*items)))

    assert expected == actual