@ivelin.peychev wrote:
I know how to get the index of the maximum value in a list.
mylist = [-10,0,1] idx_max_value = max(xrange(len(mylist)), key=mylist.__getitem__) #>>> 2However, I need it to take the abs(-10) and so the result will be 0.
How can I do that?
Thanks in advance.
Posts: 6
Participants: 2