Python 中的內建元組函式


Python 包含以下元組函式 −

序號函式及說明
1cmp(tuple1, tuple2)
比較兩個元組中的元素。
2len(tuple)
給出元組總長度。
3max(tuple)
返回元組中值最大的項。
4min(tuple)
返回元組中值最小的項。
5tuple(seq)
將列表轉換為元組。

更新於: 2020-01-28

9K+ 瀏覽

開啟你的 職業生涯

完成課程並獲得認證

開始學習
廣告
© . All rights reserved.