Python Tuple Methods | Programiz

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Start FREE Trial Start FREE Trial

Start FREE Trial Start FREE Trial

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Start FREE Trial Start FREE Trial

Start FREE Trial Start FREE Trial

Python JavaScript TypeScript SQL HTML CSS C C++ Java R Ruby RUST Golang Kotlin Swift C# DSA

Learn

Practice

Compete

Certification Courses

Created with over a decade of experience and thousands of feedback.

Python

JavaScript

TypeScript

SQL

HTML

CSS

C

C++

Java

More languages

Python

JavaScript

C

C++

Java

R

Kotlin

In Python, tuples are immutables. Meaning, you cannot change items of a tuple once it is assigned. There are only two tuple methods count() and index() that a tuple object can call.

Python Tuple count()

returns count of the element in the tuple

Python Tuple index()

returns the index of the element in the tuple