immutable--behind the scenes python creates new tuple to hold the result and sets the left-hand object reference to refer to itthe same technique is used when these operators are applied to strings tuples can be compared using the standard comparison operators (=>)with the comparisons being applied item by item (and recursively for nested items such as tuples inside tupleslet' look at few slicing examplesstarting with extracting one itemand slice of itemshair "black""brown""blonde""redhair[ 'blondehair[- :same ashair[ :('brown''blonde''red'these work the same for stringslistsand any other sequence type hair[: ]"gray"hair[ :(('black''brown')'gray'('blonde''red')here we tried to create new -tuplebut ended up with -tuple that contains two -tuples this happened because we used the comma operator with three items ( tuplea stringand tupleto get single tuple with all the items we must concatenate tupleshair[: ("gray",hair[ :('black''brown''gray''blonde''red'to make -tuple the comma is essentialbut in this caseif we had just put in the comma we would get typeerror (since python would think we were trying to concatenate string and tuple)so here we must have the comma and parentheses in this book (from this point on)we will use particular coding style when writing tuples when we have tuples on the left-hand side of binary operator or on the right-hand side of unary statementwe will omit the parenthesesand in all other cases we will use parentheses here are few examplesab ( left of binary operator del ab right of unary statement def ( )return xx * right of unary statement for xy in (( )( )( ))print(xyleft of binary operator