the upper bound is noninclusive slice boundaries default to and the sequence lengthif omitted [ : fetches items at offsets up to but not including [ :fetches items at offset through the end (the sequence lengths[: fetches items at offset up to but not including [:- fetches items at offset up to but not including the last item [:fetches items at offsets through the end--making top-level copy of extended slicing ( [ : : ]accepts step (or stridekwhich defaults to + allows for skipping items and reversing order--see the next section the second-to-last bullet item listed here turns out to be very common techniqueit makes full top-level copy of sequence object--an object with the same valuebut distinct piece of memory (you'll find more on copies in this isn' very useful for immutable objects like stringsbut it comes in handy for objects that may be changed in placesuch as lists in the next you'll see that the syntax used to index by offset (square bracketsis used to index dictionaries by key as wellthe operations look the same but have different interpretations extended slicingthe third limit and slice objects in python and laterslice expressions have support for an optional third indexused as step (sometimes called stridethe step is added to the index of each item extracted the full-blown form of slice is now [ : : ]which means "extract all the items in xfrom offset through - by the third limitkdefaults to + which is why normally all items in slice are extracted from left to right if you specify an explicit valuehoweveryou can use the third limit to skip items or to reverse their order for instancex[ : : will fetch every other item in from offsets - that isit will collect the items at offsets and as usualthe first and second limits default to and the length of the sequencerespectivelyso [:: gets every other item from the beginning to the end of the sequences 'abcdefghijklmnops[ : : 'bdfhjs[:: 'acegikmoskipping items you can also use negative stride to collect items in the opposite order for examplethe slicing expression "hello"[::- returns the new string "olleh"--the first two bounds default to and the length of the sequenceas beforeand stride of - indicates that the slice should go from right to left instead of the usual left to right the effectthereforeis to reverse the sequencestrings in action