Python tuple program to find the length of a tuple

In this python tuple program, we will find the length of a tuple.

Steps to solve the program
  1. Take a tuple as input.
  2. Find the length of a tuple using len().
  3. Print the output.
				
					tup = ('v','i','r','a','t')
print("Original tuple: ",tup)
print("Length of the tuple: ",len(tup))
				
			

Output :

				
					Original tuple:  ('v', 'i', 'r', 'a', 't')
Length of the tuple:  5
				
			

find an index of an element in a tuple.

convert a tuple into a dictionary.

Leave a Comment