blob: 373f34c2c86620e6e39ffdcf9c6f9dea733392cc (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def max_index(lst):
return lst.index(max(lst))
print(max_index([5, 2, 9, 1, 7, 6])) # Output: 2
print(max_index([4, 2, 3, 1, 5, 0])) # Output: 4
|