Creates MarkDown table. Returns list of strings

    Arguments:
      data -- [(cell00, cell01, ...), (cell10, cell11, ...), ...]
      headers -- sequence of strings: (header0, header1, ...)

def markdown_table(data, headers):
    """
    Creates MarkDown table. Returns list of strings

    Arguments:
      data -- [(cell00, cell01, ...), (cell10, cell11, ...), ...]
      headers -- sequence of strings: (header0, header1, ...)
    """

    maxx = [max([len(x) for x in column]) for column in zip(*data)]
    maxx = [max(ll) for ll in zip(maxx, [len(x) for x in headers])]
    mask = " | ".join(["%-{0:d}s".format(n) for n in maxx])

    ret = [mask % headers]

    ret.append(" | ".join(["-"*n for n in maxx]))
    for line in data:
        ret.append(mask % line)
    return ret