Let's say I have a list that looks like:
[1, 2, 2, 5, 8, 3, 3, 9, 0, 1]
Now I want to group the indices of the same elements, so the result should look like:
[[0, 9], [1, 2], [3], [4], [5, 6], [7], [8]]
How do I do this in an efficient way? I try to avoid using loops so any implementations using numpy/pandas functions are great.