How to find all positions of the maximum value in a list?

a.index(max(a))

will tell you the index of the first instance of the largest valued element of list a.

Leave a Comment