How do I get index of all the places where the same element is present. I have been using the index() method, but I only get the index of the first apperance of that element.
print([1, 1, 2, 3].index(1))
I need both an output of both 0 and 1. My knowlegde about coding terms is very bad sorry, thanks in advance.