Editing Community Data Science Course (Spring 2015)/Day 2 Lecture
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 56: | Line 56: | ||
* accessing elements | * accessing elements | ||
** indexing like my_list[0] | ** indexing like my_list[0] | ||
** indexing starts from the front and we ''start counting at 0'' (now you understand all the zeros we've been using | ** indexing starts from the front and we ''start counting at 0'' (now you understand all the zeros we've been using | ||
** we go from the end with negative numbers | ** we go from the end with negative numbers | ||
** what happens if we try to move outside of the range? ('''error!'') | ** what happens if we try to move outside of the range? ('''error!'') |