►
Run
myTuple = ('apple', 'banana', 'mango') element = 'watermelon' try: ind = myTuple.index('watermelon') print(ind) except ValueError as e: print(element, 'not in the tuple.')
Output