Python List min() method
Description
The min() method returns the smallest element in a list.
Syntax
min() method syntax:
min(list)
Parameters
- list -- the list whose smallest element is returned.
Return Value
Returns the smallest element in the list.
Example
The following example shows how to use the min() function:
#!/usr/bin/python
list1, list2 = [123, 'xyz', 'zara', 'abc'], [456, 700, 200]
print "min value element : ", min(list1);
print "min value element : ", min(list2);
The output of the above example is:
min value element : 123
min value element : 200
Python Lists