Sobes.tech
Junior — Middle

Is it possible to access a specific element of a tuple by its position?

sobes.tech AI

Answer from AI

Yes, in Python you can access a specific element of a tuple by its position using indexing. Indexes start at 0. For example:

my_tuple = (10, 20, 30, 40)
print(my_tuple[2])  # Will output 30

Thus, my_tuple[2] returns the third element of the tuple.

Is it possible to access a specific element of a… - sobes.tech