def _as_range_str(iterable):
    """
    Return a string representing the range as a string span.
    """
    l = list(iterable)
    if len(l) > 1:
        return '{0}-{1}'.format(l[0], l[-1])
    return '{0}'.format(l[0])