Latest web development tutorials

Python3 List min () method

Python3 list Python3 list


description

min () method returns the minimum list of elements.

grammar

min () method syntax:

min(list)

parameter

  • list - a list of the minimum value to be returned.

return value

Returns the minimum list of elements.

Examples

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

#!/usr/bin/python3

list1, list2 = ['Google', 'w3big', 'Taobao'], [456, 700, 200]

print ("list1 最小元素值 : ", min(list1))
print ("list2 最小元素值 : ", min(list2))

Examples of the above output results are as follows:

list1 最小元素值 :  Google
list2 最小元素值 :  200

Python3 list Python3 list