def find_in_list(x, l):
    """
    Get indices of the element x in list l

    :param x: element to find
    :param list l: list to be inspected
    :return list: indices of the element
    """
    assert isinstance(l, list), "The argument l has to be a list, got '{}'.".format(type(l))
    return [index for index, value in enumerate(l) if value == x]