min()
函数min()
函数返回最小值,参数可以为序列。
>>> help(min)
Help on built-in function min in module builtins: min(...) ## 使用方法: min(iterable, *[, default=obj, key=func]) -> value min(arg1, arg2, *args, *[, key=func]) -> value With a single iterable argument, return its smallest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the smallest argument.
示例1.
>>> min([1,2,3,0])
# output: 0
示例2.
>>> list(range(5)), min(range(3))
# output: ([0, 1, 2, 3, 4], 0)