Popular recipes tagged "elements"http://code.activestate.com/recipes/tags/elements/2011-10-29T22:21:39-07:00ActiveState Code RecipesPython Multidimensional List Searcher (Python) 2011-10-29T22:21:39-07:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577929-python-multidimensional-list-searcher/ <p style="color: grey"> Python recipe 577929 by <a href="/recipes/users/4179768/">Alexander James Wallar</a> (<a href="/recipes/tags/element/">element</a>, <a href="/recipes/tags/elements/">elements</a>, <a href="/recipes/tags/find/">find</a>, <a href="/recipes/tags/finder/">finder</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/search/">search</a>). </p> <p>This module/function lets you find a 2 dimensional list of indices for elements you are looking for in a super list. Example:</p> <p>find([1,1,1,2,1,2,3,3],[1,2,3])</p> <p>returns: [[0, 1, 2, 4], [3, 5], [6, 7]]</p>