Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions
Content added Content deleted
imported>Mako (→Lists) |
imported>Mako (→Lists) |
||
Line 58: | Line 58: | ||
* accessing elements |
* accessing elements |
||
** indexing like my_list[0] |
** indexing like my_list[0] |
||
** indexing starts from the front 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 |
||
** what happens if we try to move outside of the range? ('''error!'') |
|||
** we go from the end with negative numbers |
** we go from the end with negative numbers |
||
* adding elements |
* adding elements |