Python3 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/python3
list1, list2 = ['Google', 'Runoob', 'Taobao'], [456, 700, 200]
print ("list1 最小元素值 : ", min(list1))
print ("list2 最小元素值 : ", min(list2))
The output of the above example is:
list1 最小元素值 : Google
list2 最小元素值 : 200
The Python3 list