import random


def rnd_select(list_a: list, n: int):
    """Problem 23: Extract a given number of randomly selected items from a list.

    Parameters
    ----------
    list_a : list
        The input list
    n : int
        The number of elements to randomly select

    Returns
    -------
    list
        A list of `n` randomly selected numbers out of the initial list

    Raises
    ------
    TypeError
        If the given argument is not of `list` type
    ValueError
        If the given `start` is smaller than `end`

    """
    if not isinstance(list_a, list):
        raise TypeError('The argument given is not of `list` type.')
    if n < 0 or len(list_a) < n:
        raise ValueError('The value of the given `n` is invalid.')

    return random.sample(list_a, n)