spans = [days[begin:end] for begin, end in zip([0] + ends, ends)]
words = []
for span in spans:
    if len(span) < 3:
        words.extend(span)
else:
    words.append('%s to %s' % (span[0], span[-1]))
if len(days) == 1:
    return words[0]
elif len(days) == 2:
    return '%s and %s' % tuple(words)
else:
    return ', '.join(words)
Python: Converting ('Monday', 'Tuesday', 'Wednesday') to 'Monday to Wednesday'