{' ': ' ': }[' ' {' ': ' ': ' ': [' ' [' ' [' ' [( , , ) index dictionary by key create new entry tuple used as key (immutabled {' ' ' ' ' ' ( ) ' ' list( keys())list( values())( , , in ([' '' '' '( )' '][ ]truemethodskey test empties [[]]["",[],(),{},none([[]][''[](){}none]lots of nothingsempty objects indexing and slicing indexing out of bounds ( [ ]raises an errorpython always checks to make sure that all offsets are within the bounds of sequence on the other handslicing out of bounds ( [- : ]works because python scales out-of-bounds slices so that they always fit (the limits are set to zero and the sequence lengthif requiredextracting sequence in reversewith the lower bound greater than the higher bound ( [ : ])doesn' really work you get back an empty slice (]because python scales the slice limits to make sure that the lower bound is always less than or equal to the upper bound ( [ : is scaled to [ : ]the empty insertion point at offset python slices are always extracted from left to righteven if you use negative indexes (they are first converted to positive indexes by adding the sequence lengthnote that python ' three-limit slices modify this behavior somewhat for instancel[ : :- does extract from right to leftl [ [ traceback (innermost last)file ""line in indexerrorlist index out of range [- : [ [ : [ [ [ : ['?' [ '?' part iitypes and operations