Tuple methods · Python Reference

Tuples are fixed sequences, so they have only two methods: count and index. This page group explains both, shows how they behave with duplicates and missing values, and links to the lessons on tuples and unpacking for everything else you can do with them.

All 2

Python Tuple count() Method
`tuple.count(value)` returns how many items in the tuple are equal to `value`, or `0` if there are none. It is one of only two tu…
Python Tuple index() Method
`tuple.index(value, start, stop)` returns the position of the **first** item equal to `value` and raises `ValueError` if the valu…

Explore more

Python ProgramsPython ComparisonsPython How-To GuidesPython Cheat SheetsPython glossaryPython tutorial