This min()
function returns the smallest item from a collection.
min(collection[, key])
Here,
Note: When comparing sequences lexical comparison is used.
>>> min(1, 2, 3)
1
>>> min('A', 'a', 'b')
'A'
>>> min([1, 2], [2, 1], [3, 1])
[1, 2]
>>> min(str([1, 2]), str([2, 1]), str([3, 1]))
'[1, 2]'
>>> min('apple', 'Pear', key=lambda x: x.upper())
'apple'
>>> min('apple', 'Pear')
'Pear'