[Solved] how to turn this python lines code into a list comprehension?


Assuming that sorted_indices contains only integers:

tmaxima = [t[i] for i in sorted_indices]
ag_maxima = [a_g[i] for i in sorted_indices]

solved how to turn this python lines code into a list comprehension?