from typing import List
from typing import Any


def flatten(x: List[Any]) -> List[Any]:
    """Returns flattened list.

    Args:
        x (list): Nested Python list.

    Returns:
        list: Flattened Python list.
    """
    return [i for sl in x for i in sl]