Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python Tuple min() method

Python Tuple min() method

Python TuplePython Tuple


Description

The Python tuple min() function returns the minimum value among the elements of a tuple.

Syntax

min() method syntax:



min(tuple)

Parameters

Return Value

Returns the minimum value among the elements of a tuple.

Example

The following example shows how to use the min() function:



#!/usr/bin/python



tuple1, tuple2 = (123, 'xyz', 'zara', 'abc'), (456, 700, 200)



print "min value element : ", min(tuple1);

print "min value element : ", min(tuple2);

The output of the above example is:



min value element :  123

min value element :  200

Python TuplePython Tuple