[python] index of absolute maximum value in a list

Hi, try this:

max(enumerate(mylist), key = lambda x: abs(x[1]))[0]
1 Like