Python 中的内置元组函数

pythonserver side programmingprogramming

Python 包含以下元组函数 −

Sr.No带说明的函数
1cmp(tuple1, tuple2)
比较两个元组的元素。
2len(tuple)
给出元组的总长度元组。
3max(tuple)
返回元组中具有最大值的项目。
4min(tuple)
返回元组中具有最小值的项目。
5tuple(seq)
将列表转换为元组。

相关文章