Programming with Python

  1. Home
  2. Docs
  3. Programming with Python
  4. Tuples in python
  5. Accessing Tuples in python

Accessing Tuples in python

A tuple is a standard datatype of python that can store a sequence of values belonging to any type. The tuples are depicted through parenthesis.

Tuples are immutable sequences having a progression of elements.

We can access elements of tuple by using its index number.

syntax:-

tuple_name[index of element]

e.g.,

t=(11, 20, 33, 46, 54, 65)
t[2]
Output- 33

In this way we access elements of tuple in python.

Was this article helpful to you? Yes No

How can we help?