Checking if a value is in a list based on indexes
<p>If I have a list that is made up of indexes from a list of lists, how would I use an index collected from a value in that list and find out which list it is in? </p>

<p>Here is an example:</p>

<pre><code>listolists = [
    [0, 8, 4, 0, 7],
    [3, 6, 0, 9, 0],
    [4, 0, 3, 7, 0],
    [7, 0, 7, 0, 6]
    ]
section1 = [listolists[0][0], listolists[0][1], listolists[1][0], listolists[1][1]]
section2 = [listolists[3][4], listolists[2][4], listolists[3][3], listolists[2][3]]
for c row in enumerate(listolists):
    if 0 in row:
        *if 1, 2, and 3 are in whichever "section"(section1 or section2) the 0 is in*
            print ("Success")
</code></pre>

<p>The goal of this would be for the program to look at the index of the 0 that it has found. Then it should see if the 0's index matches up with any of the "sections." Then it should look in the section that the 0 is in and check if that list contains 1, 2, or 3. The part with the * around it is obviously incorrect and is the part that I need to find the correct syntax on. I have looked all over the internet and have been unable to find any help for this topic.</p>

<p>Thanks.</p>
