Python ProgrammingPython Programming

How to find the index of the minimum value of a list in Python?

thelist = [5, 9, 4, 9, 7, 2, 8]

print(thelist.index(min(thelist)))
Output
5