tuples tuples are immutable sequences of arbitrary objects they are indexed by integers greater than zero tuples are hashablewhich means we can sort lists of them and they can be used as keys to dictionaries syntacticallytuples are just comma-separated sequence of valueshoweverit is common practice to enclose them in parenthesestpl(' '' '' 'it is important to remember to use trailing comma when creating tuple with one elementfor examplet (' ',without the trailing commathis would be interpreted as string we can also create tuple using the built-in function tuple(with no argumentthis creates an empty tuple if the argument to tuple(is sequence then this creates tuple of elements of that sequencefor examplemost operatorssuch as those for slicing and indexingwork as they do on lists howeverbecause tuples are immutabletrying to modify an element of tuple will give you typeerror we can compare tuples in the same way that we compare other sequencesusing the ==and operators an important use of tuples is to allow us to assign more than one variable at time by placing tuple on the left-hand side of an assignmentfor examplewe can actually use this multiple assignment to swap values in tuplefor examplea valueerror will be thrown if the number of values on each side of the assignment are not the same