def first(iterable, *default):
    """Returns the first value of anything iterable, or throws StopIteration
    if it is empty. Or, if you specify a default argument, it will return that.
    """
    return next(iter(iterable), *default)