Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions

imported>Mako
imported>Mako
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()
Anonymous user