Returning index of list with greatest value
<pre><code>def findMaxDiff(l):
    'list(list(int)), returns index of the row with the maximum difference between elements and the value of the difference in that row'
    return (max(max(a) - min(a) for a in l), l.index(max(l, key=max)))
</code></pre>

<p>While I've gotten it to return the value of the maximum number, I can't quite get it to return the correct index of that list. It works fine in this case:</p>

<pre><code>&gt;&gt;&gt; findMaxDiff([[12,3,50,17], [10,5,9,100,31], [5,3,1]])
    (95, 1)
</code></pre>

<p>But doesn't in this case.</p>

<pre><code>&gt;&gt;&gt; findMaxDiff([[0,10],[99,99]])
    (10, 1)
&gt;&gt;&gt; findMaxDiff([[1],[2],[3]])
    (0, 2)
</code></pre>

<p>For the first one it should return (10,0), and the second should return (0,0). I've tried key=sum and key=max, but both return the same thing.</p>
