Python processing for loop for comparison
<p>I need to compare 2 tables of similar schema and have 2 generator objects..How do I compare these 2 generators row by row in Python. Need to implement the file comparison logic,</p>

<pre><code>If generator-object-1 =  generator-object-1:
        then read-next-row-generator-object-1,read-next-row-generator-object-1
elif generator-object-1 &gt;  generator-object-2:
        then read-next-row-generator-object-2
elif generator-object-1 &lt;  generator-object-2
        then read-next-row-generator-object-1
</code></pre>

<p>Is there any better way to do in Python?</p>
