list = [3,5,1,8,9]
I want to find positions of the maximum value in the list
Asked
Active
Viewed 101 times
1 Answers
1
This is pretty simple, but it will give you the index of the first occurrence:
>>> l = [3,5,1,8,9]
>>> l.index(max(l))
4
I strongly suggest you not use the name of built-in functions as list
for variables.

lmiguelvargasf
- 63,191
- 45
- 217
- 228