def squash_int_range(ilist):
    """Takes a list of integers and squashes consecutive values into a string
    range. Returned list contains mix of strings and ints.
    """
    irange = []
    rstart = None
    rprev = None

    sorted(ilist)
    for i, value in enumerate(ilist):
        if rstart is None:
            if i == (len(ilist) - 1):
                irange.append(value)
                break

            rstart = value

        if rprev is not None:
            if rprev != (value - 1):
                if rstart == rprev:
                    irange.append(rstart)
                else:
                    irange.append("{}-{}".format(rstart, rprev))
                    if i == (len(ilist) - 1):
                        irange.append(value)

                rstart = value
            elif i == (len(ilist) - 1):
                irange.append("{}-{}".format(rstart, value))
                break

        rprev = value

    return irange