title: Comparing all elements of two tuples (with all() functionality)
body: <p>So i know that <a href="http://docs.python.org/reference/expressions.html#not-in" rel="noreferrer">comparisons on tuples</a> work lexicographically:</p>
  
  <blockquote>
    <blockquote>
      <p>Tuples and lists are compared lexicographically using comparison of corresponding elements. This means that to compare equal, each element must compare equal and the two sequences must be of the same type and have the same length.</p>
      
      <p>If not equal, the sequences are ordered the same as their first differing elements. For example, cmp([1,2,x], [1,2,y]) returns the same as cmp(x,y). If the corresponding element does not exist, the shorter sequence is ordered first (for example, [1,2] &lt; [1,2,3]).</p>
    </blockquote>
  </blockquote>
  
  <p>So from this:</p>
  
  <pre><code>&gt;&gt;&gt; a = (100, 0)
  &gt;&gt;&gt; b = (50, 50)
  &gt;&gt;&gt; a &gt; b
  True
  </code></pre>
  
  <p>But i want to compare all elements of 2 tuples in order, so functionally i want something akin to (using values from above):</p>
  
  <pre><code>&gt;&gt;&gt; a &gt; b
  (True, False) #returned tuple containing each comparison
  &gt;&gt;&gt; all(a &gt; b)
  False
  </code></pre>
  
  <p>As an example in practice, for something like screen coordinates, if you wanted to check if something was 'inside' the screen at (0,0), but done a comparison like coord > (0,0), if the x coord was bigger than 0, but the y coord was smaller it would still return true, which isn't what is needed in this case.</p>
  
  <p>As sort of a sub question/discussion:<br>
  I am not sure why comparing 2 tuples of different values is returned in such a way. You are not given any sort of index, so the only thing you get from comparing a tuple (that isn't testing equality) is that at some point in the tuple, one of the comparisons will throw a true or false value when they are not equal. How could you take advantage of that?</p>