def _get_cols_length(table, cols_num):
    """Return the max length of every columns.
    """
    cols_length = [0] * cols_num
    for row in table:
        for (i, col) in enumerate(row):
            col_len = len(col)
            if col_len > cols_length[i]:
                cols_length[i] = col_len
    return cols_length