Built-in Tuple Functions in Python



Python includes the following tuple functions −

Sr.NoFunction with Description
1cmp(tuple1, tuple2)
Compares elements of both tuples.
2len(tuple)
Gives the total length of the tuple.
3max(tuple)
Returns item from the tuple with max value.
4min(tuple)
Returns item from the tuple with min value.
5tuple(seq)
Converts a list into tuple.

Advertisements