python元组内置函数

Python元组包含了以下内置函数

序号

方法及描述

1

cmp(tuple1, tuple2)
比较两个元组元素。

2

len(tuple)
计算元组元素个数。

3

max(tuple)
返回元组中元素最大值。

4

min(tuple)
返回元组中元素最小值。

5

tuple(seq)
将列表转换为元组。

 

posted @ 2019-07-20 14:51  聂忠乐  阅读(1531)  评论(0编辑  收藏  举报