list in the interactive python shell and explore the effect of various slicing operations it isof course ,possible to combine list slicing with nested listsand the results can be confusing even to experienced python programmers fortunatelywe will consider only fairly simple cases of list slicing in this bookand we will work mostly with lists of one or two dimensions ( nonnested lists or the simplest lists-of-lists tuples lists are flexible and user-friendly way to store sequences of numbersand are used in nearly all python programs howevera few other data types are also made to store sequences of data one of the most important ones is called tupleand it is essentially constant list that cannot be changed tuple is defined in almost the same way as listbut with normal parentheses instead of the square brackets alternativelywe can skip the parentheses and just use comma-separated sequence of values to define tuple the following are two examples that are entirely equivalent and define the same tupledefine tuple can skip parentheses ( 'temp pdf' 'temp pdftuples also provide much of the same functionality as listsincluding indexing and and slicingt (- - ( 'temp pdf'- - [ [ :( 'temp pdf'- - in true add two tuples indexing subtuple/slice membership howevertuples are immutablewhich means that they cannot be changed thereforesome operations we are used to from lists will not work continuing the interactive session from abovethe following are some examples of illegal tuple operationst[ - typeerror'tupleobject does not support item assignment append( attributeerror'tupleobject has no attribute 'appenddel [