Accessing Tuple elements

Tuples in Python are accessed using index. The index starts from 0. Below are various example ## Access an element of tuple myTuple = ("apple", "banana", "orange", "grapes", "cherry", "pear") print("First element of the tuple is: ", myTuple[0]) # Output: First element of the tuple is: apple print("Second element of the tuple is: ", myTuple[1]) … Continue reading Accessing Tuple elements