def first(iterable):
    """
    Gets the first element from an iterable. If there are no items or there
    are not enough items, then None will be returned.
    :param iterable: Iterable
    :return: First element from the iterable
    """
    if iterable is None or len(iterable) == 0:
        return None
    return iterable[0]