what is a pythonic way to get the number of times list1[i] < list2[i] and vise versa
<p>I have two lists with values, the expected result is a tuple <code>(a,b)</code> where <code>a</code> is the number of i values which <code>list1[i] &lt; list2[i]</code>, and <code>b</code> is the number of i values where <code>list1[i] &gt; list2[i]</code> (equalities are not counted at all).</p>

<p>I have this solution, and it works perfectly:</p>

<pre><code>x = (0,0)
for i in range(len(J48)):
    if J48[i] &lt; useAllAttributes7NN[i]:
      x = (x[0]+1,x[1])
    elif J48[i] &gt; useAllAttributes7NN[i]:
        x = (x[0], x[1]+1)
</code></pre>

<p>However, I am trying to improve my python skills, and it seems very non-pythonic way to achieve it. </p>

<p><strong>What is a pythonic way to achieve the same result?</strong></p>

<p><strong>FYI</strong>, this is done to achieve the required input for <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binom_test.html" rel="nofollow"><code>binom_test()</code></a> that tries to prove two algorithms are not statistically identical.
<br>I don't believe this information has any additional value to the specific question though.</p>
