Re: Newbie: The philosophy behind list indexes

2013-06-19 Thread ian . l . cameron
Thanks everyone for taking the time to offer some very insightful replies. Learning a new language is so much more fun with a group of friendly and helpful people around! -- http://mail.python.org/mailman/listinfo/python-list

Newbie: The philosophy behind list indexes

2013-06-14 Thread ian . l . cameron
I bet this is asked quite frequently, however after quite a few hours searching I haven't found an answer. What is the thinking behind stopping 'one short' when slicing or iterating through lists? By example; >>> a=[0,1,2,3,4,5,6] >>> a [0, 1, 2, 3, 4, 5, 6] >>> a[2:5] [2, 3, 4] To my mind,