Retrieve the Indices with the Highest Number

Hello all, I need some help with retrieving the indices with the highest data. Indices highlighted with blue should be retrieve while maintaining the indices. These should be retrieved automatically; indices should not be manually inputted.

output should be a list of 12,13,14,15,18


Aidea.gh (11.9 KB)

2 Likes
  1. Open a python component
  2. Use the following code:
inds = [index for index, item in enumerate(x) if item == max(x)]
a = inds

Whereby x is the name of the place you connect your list (remember to swap to list input and float)

It’s cleaner on your file. Enjoy.

1 Like

Hi it worked, thank you!

thank you!

Hi! how can i retrieved the item with the highest value without sorting the list?

Fastest with bounds


Aidea2.gh (10.0 KB)

1 Like