中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python Tuple(元組) len()方法

Python 元組Python 元組


描述

Python 元組 len() 函數(shù)計(jì)算元組元素個(gè)數(shù)。

語法

len()方法語法:

len(tuple)

參數(shù)

  • tuple -- 要計(jì)算的元組。

返回值

函數(shù)返回元組元素個(gè)數(shù)。

實(shí)例

以下實(shí)例展示了 len()函數(shù)的使用方法:

#!/usr/bin/python

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

print "First tuple length : ", len(tuple1);
print "Second tuple length : ", len(tuple2);

以上實(shí)例輸出結(jié)果如下:

First tuple length :  3
Second tuple length :  2

Python 元組Python 元組

其他擴(kuò)展