Python program to find values of tuples at ith index number

In this python tuple program, we will find values of tuples at ith index number.

Steps to solve the program
  1. Take a list of tuples as input.
  2. Find the values of the tuple at the 3rd index in the list of tuples using indexing.
  3. 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)
				
			

assign the frequency of tuples to each tuple.

test whether a tuple is distinct or not.

Leave a Comment