the programs we have looked at thus far have dealt with three types of objectsintfloatand str the numeric types int and float are scalar types that is to sayobjects without accessible internal structure in contraststr can be thought of as structuredor non-scalartype one can use indexing to extract individual characters from string and slicing to extract substrings in this we introduce three structured types onetupleis rather simple generalization of str the other twolist and dictare more interesting--in part because they are mutable we also return to the topic of functions with some examples that illustrate the utility of being able to treat functions in the same way as other types of objects tuples like stringstuples are ordered sequences of elements the difference is that the elements of tuple need not be characters the individual elements can be of any typeand need not be of the same type as each other literals of type tuple are written by enclosing comma-separated list of elements within parentheses for examplewe can write ( ( 'two' print print unsurprisinglythe print statements produce the output (( 'two' looking at this exampleyou might naturally be led to believe that the tuple containing the single value would be written ( butto quote richard nixon"that would be wrong since parentheses are used to group expressions( is merely verbose way to write the integer to denote the singleton tuple containing this valuewe write ( ,almost everybody who uses python has at one time or another accidentally omitted that annoying comma like stringstuples can be concatenatedindexedand sliced consider ( 'two' ( print print ( print ( )[ print ( )[ : the second assignment statement binds the name to tuple that contains the tuple to which is bound and the floating point number this is