def expandCommaSeparatedRanges(s):
    """
        's' format - comma separated ranges or values
            a-b,c,..,d,e-f,a etc.
        Includes the first and the last value in the range
    """
    range_list = s.split(',')
    values = list()
    for r in range_list:
        # range a-b
        if '-' in r:
            # start and end of the range can have
            # any number of digits
            ind = r.index('-')
            s = int(r[0:ind])
            e = int(r[ind+1:])
            values += (range(s,e+1))
        # single value
        else:
            values.append(int(r))
    return values