python中元组的内置函数

2026-02-16 03:08:21

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

python中元组的内置函数

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

python中元组的内置函数

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

python中元组的内置函数

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

python中元组的内置函数

5、tuple.count(x):元组中x出现的次数。

python中元组的内置函数

猜你喜欢