Python Tuple(元组) min()方法

Python 教程 · 2019-02-03 06:14:00

描述

Python 元组 min() 函数返回元组中元素最小值。

语法

min()方法语法:

min(tuple)

参数

  • tuple -- 指定的元组。

返回值

返回元组中元素最小值。

实例

以下实例展示了 min()函数的使用方法:

#!/usr/bin/python

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

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

以上实例输出结果如下:

min value element :  123
min value element :  200

点击查看所有 Python 教程 文章: https://www.codercto.com/courses/l/8.html

查看所有标签

The Linux Programming Interface

The Linux Programming Interface

Michael Kerrisk / No Starch Press / 2010-11-6 / GBP 79.99

The Linux Programming Interface describes the Linux API (application programming interface)-the system calls, library functions, and other low-level interfaces that are used, directly or indirectly, b......一起来看看 《The Linux Programming Interface》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具