May 13, 2008

Python Slices, Slicing

http://www.diveintopython.org/native_data_types/lists.html#d0e5623

  • returns a new list/tuple
  • subset of a list/tuple BUT NOT dictionaries
  • list[start:end-1]
  • one or both of the slice indices can be negative