Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 695 Bytes

slicing.md

File metadata and controls

7 lines (5 loc) · 695 Bytes

Slicing

TODO: ADD MORE

  • the extended solution to this exercise can employ a slice (returns a copy) instead of calling .copy(). matrix
  • a slice within an iterable, i.e. the slice of items from <iterable>[x] to <iterable>[y], can be accessed via <iterable>[x:y] notation; a third parameter allows "skipping" by z, i.e. stringname[x:y:z] phone-number
  • because str in Python is a sequence type, slicing syntax can be used here. Specifically: for syntax string[start:stop:stride]: reverse-string