[Tutor] s.insert(i, x) explanation in docs for Python 3.4 confusing to me

Peter Otten __peter__ at web.de
Sun Jan 17 05:34:20 EST 2016


Steven D'Aprano wrote:

>> Slightly related is a problem that comes up in practice; you cannot
>> specify "including the last item" with negative indices:
> 
> But you can do so by leaving the end index blank:

That's why the problem typically comes up when the stop index is a variable.



More information about the Tutor mailing list