Source Code:
(back to article)
# Finding the index of a tuple element my_tuple = ("apple", "banana", "cherry") index = my_tuple.index("banana") print(index) # Output: 1
Result:
Report an issue