from typing import Iterable
from typing import Any
from typing import List


def take(n: int, it: Iterable[Any]) -> List[Any]:
    """
    Get a list of N elements from the beginning of the iterable object

    Args:
        n: Number of items to extract from the top
        it: Iterable object

    Examples:
        >>> fpsm.take(2, [1, 2, 3, 4, 5])
        [1, 2]
        >>> fpsm.take(3, map(lambda x: x ** 2, range(1, 10)))
        [1, 4, 9]
    """
    return list(it)[:n]