[Tutor] more on index handling
Alan Gauld
alan.gauld at blueyonder.co.uk
Tue Apr 13 18:47:43 EDT 2004
> Half-open intervals --- the ones that exclude the last index ---
have nice
> properties. For example, they "glue" together very well:
>
> ###
> >>> range(0, 5) + range(5, 10)
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
And of course thats obvious with literal numbers but when the
values are stored in variables like:
range(0,mid_point) + range(mid_point,limit)
The advantages may be more obvious.
I had seen that explanation before but had forgotten.
Thanks for the reminder Danny.
Alan G.
More information about the Tutor
mailing list