I\'ve been tinkering in python this week and I got stuck on something.
If I had a 2D list like this:
myList = [[1,2],[3,4],[5,6]]
and
Based on kevpie's answer I managed to get a 2D list containing the coordinates of all occurences
myList = [[0,1],[1,1],[0,0],[1,0]]
coordsList = [[x, y] for x, li in enumerate(myList) for y, val in enumerate(li) if val==1]
Now coordsList contains all indexes for value 1 in myList :
[[0, 1], [1, 0], [1, 1], [3, 0]]