def tile(lt, width=70, gap=1):
    from jcvi.utils.iter import grouper

    max_len = max(len(x) for x in lt) + gap
    items_per_line = max(width / max_len, 1)
    lt = [x.rjust(max_len) for x in lt]
    g = list(grouper(lt, items_per_line, fillvalue=""))

    return "\n".join("".join(x) for x in g)
Pretty print list of items.
dataset/ETHPy150Open tanghaibao/jcvi/utils/cbook.py/tile