The index number, enclosed in square brackets, can be used to retrieve Python tuple items:
Example:
Print the second item in the tuple:
thistuple = ("cranberry", "blueberry", "apricot")
print(thistuple[1])
The index number, enclosed in square brackets, can be used to retrieve Python tuple items:
Example:
Print the second item in the tuple:
thistuple = ("cranberry", "blueberry", "apricot")
print(thistuple[1])