Python3 List min() Method
Description
The min() method returns the minimum value in the list elements.
Syntax
The syntax of the min() method is:
min(list)
Parameters
- list -- The list from which to return the minimum value.
Return Value
Returns the minimum value in the list elements.
Examples
The following example demonstrates the usage of the min() function:
#!/usr/bin/python3
list1, list2 = ['Google', 'Example', 'Taobao'], [456, 700, 200]
print ("list1 最小元素值 : ", min(list1))
print ("list2 最小元素值 : ", min(list2))
The output of the above example is as follows:
list1 最小元素值 : Google list2 最小元素值 : 200Other Extensions
Python3 Lists