from typing import List
from typing import Any


def get_max_column_lengths(rows: List[List[Any]]) -> dict:
    """
    :param rows: 2D list containing objects that have a single-line representation (via `str`).

    :return: A dict of the maximum string length in each column
    """

    number_of_columns = len(rows[0])

    max_lengths = dict()

    # for i in range(0, number_of_columns):
    #     max_lengths[i] = 0
    #     for row in rows:
    #         word = row[i]
    #         if len(str(word)) > max_lengths[i]:
    #             max_lengths[i] = len(str(word))

    for index, row in enumerate(rows):
        max_lengths[index] = 0
        for word in row:
            if len(str(word)) > max_lengths[index]:
                max_lengths[index] = len(str(word))

    return max_lengths