In this python tuple program, we will find values of tuples at ith index number.
Steps to solve the program
- Take a list of tuples as input.
- Find the values of the tuple at the 3rd index in the list of tuples using indexing.
- Print the output.
l = [(1,2,3),(6,5,4),(7,6,8),(9,0,1)]
print("Tuple at index 3: ",l[3])
Output :
Tuple at index 3: (9, 0, 1)