Anonymous user
Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions
Community Data Science Workshops (Fall 2014)/Day 1 lecture (view source)
Revision as of 17:00, 8 November 2014
, 9 years ago→Lists
imported>Mako (→Lists) |
imported>Mako (→Lists) |
||
Line 69:
** e.g., <code>"z" in my_list</code>
* slicing lists
** the colon inside the [] is the ''slicing syntax''
** e.g., <code>my_list[0:2]</code> is 0th up to, but not including, the 2nd
** e.g., <code>my_list[2:]</code>
** e.g., <code>my_list[:2]</code>
** e.g., <code>my_list[:]</code>
* strings are like lists
** len()
|