Yes, tuples are ordered data structures in Python. This means that the elements in a tuple maintain their order, and you can access them using their index, similar to lists. The first element is at index 0, the second at index 1, and so on.
Here’s an example of a tuple:
my_tuple = (1, 2, 3, 4)
# Accessing elements by index
first_element = my_tuple[0] # 1
second_element = my_tuple[1] # 2
print(first_element) # Output: 1
print(second_element) # Output: 2
Since tuples are immutable, once they are created, you cannot change their elements, but their order remains consistent.
