69pao国产精品视频-久久精品一区二区二三区-精品国产精品亚洲一本大道-99国产综合一区久久

Python Tuple 元組 min()方法

Python Tuple 元組 min()方法

Python 元組 TuplePython 元組 Tuple

Python 元組 min() 函數(shù)返回元組中元素最小值。

 

語(yǔ)法

min()方法語(yǔ)法:

min(tuple)

 

參數(shù)

  • tuple -- 指定的元組。

 

返回值

返回元組中元素最小值。

 

實(shí)例

以下實(shí)例展示了 min()函數(shù)的使用方法:

#!/usr/bin/python

tuple1, tuple2 = (123, 'xyz', 'zara', 'abc'), (456, 700, 200)

print "min value element : ", min(tuple1);
print "min value element : ", min(tuple2);

以上實(shí)例輸出結(jié)果如下:

min value element :  123
min value element :  200

Python 元組 TuplePython 元組 Tuple

下一節(jié):Python Tuple tuple()方法

Python 教程

相關(guān)文章