On Mon, Sep 15, 2014 at 3:46 PM, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> > I assume it's based on the concepts of slicing. From the docs > "s.insert(i, x) - inserts x into s at the index given by i (same as s[i:i] > = [x])". Ah, right. It matches thigs like s[100:] which is the empty string if s is shorter than 100. > Although shouldn't that read s[i:i+1] = [x] ? > Should've stopped while you were ahead. :-) 'Nuff said. -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com