Skip to content
Home » Python program to print the index of the minimum element in a tuple

Python program to print the index of the minimum element in a tuple

Program to print the index of the minimum element in a tuple

tup=eval(input("Enter a tuple:"))
mn=min(tup)
print("Minimum element",mn,"is at index",tup.index(mn))

Output

Enter a tuple:(34,56,87,65,76)

Minimum element 34 is at index 0