from typing import List
from typing import Any


def line_to_csv(line: List[Any]) -> str:
    """
    Turn a list of Python objects into a comma separated string.

    Args:
        line: List to turn into CSV

    Returns:
        Line represented as a comma separated string

    """
    items = []
    for item in line:
        if not isinstance(item, str):
            items.append(str(item))
        elif ',' in item:
            items.append(f'"{item}"')
        else:
            items.append(item)
    return ','.join(items) + '\n'