Python基础学习笔记(七)常用元组内置函数

  参考资料:

  1. 《Python基础教程》

  2. http://www.runoob.com/python/python-tuples.html

  3. http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000

 

  Python常用元组内置函数:

序号方法及描述
1 cmp(tuple1, tuple2)
比较两个元组元素。
2 len(tuple)
计算元组元素个数。
3 max(tuple)
返回元组中元素最大值。
4 min(tuple)
返回元组中元素最小值。
5 tuple(seq)
将列表转换为元组。

  

posted @ 2015-10-08 00:08  motein  阅读(272)  评论(0编辑  收藏  举报