Python – Access Tuple Items

Access Tuple Items

You can access tuple items by referring to the index number, inside square brackets:

Example

Print the second item in the tuple:

thistuple = ("apple", "banana", "cherry")
print(thistuple[1])

Note: The first item has index 0.

Continue reading Python – Access Tuple Items