Jak znaleźć indeks drugiej co do wielkości liczby w tablicy Python
>>> fr = [8,4,1,1,12]
>>> n = 3
>>> result = [fr.index(i) for i in sorted(fr, reverse=True)][:n]
>>> print(result)
[4, 0, 1]
Modern Magpie