out[ ][ while element at the start index is includedthe stop index is not includedso that the number of elements in the result is stop start either the start or stop can be omitted in which case they default to the start of the sequence and the end of the sequencerespectivelyin [ ]seq[: out[ ][ in [ ]seq[ :out[ ][ negative indices slice the sequence relative to the endin [ ]seq[- :out[ ][ in [ ]seq[- :- out[ ][ slicing semantics takes bit of getting used toespecially if you're coming from or matlab see figure - for helpful illustrating of slicing with positive and negative integers step can also be used after second colon tosaytake every other elementin [ ]seq[:: out[ ][ clever use of this is to pass - which has the useful effect of reversing list or tuplein [ ]seq[::- out[ ][ figure - illustration of python slicing conventions built-in sequence functions python has handful of useful sequence functions that you should familiarize yourself with and use at any opportunity data structures and sequences www it-ebooks info