How to run two loop simeltanously in one loop in python
<p>Is there any way available to put two loops in one? I have:</p>

<pre><code>for getFeature in layerNameValueGetObj.getFeatures():
    for setFeature in layerNameValueSetObj.getFeatures():
</code></pre>

<p>I want to run <code>layerNameValueGetObj.getFeatures()</code> and <code>layerNameValueSetObj.getFeatures()</code> under one loop. How can I do this?</p>

<p>I don't want to nest them, I want to get both loop columns at a time.</p>

<p>You can use <a href="https://docs.python.org/2/library/functions.html#zip" rel="nofollow">zip</a></p>

<pre><code>for a, b in zip(list_a, list_b): 
    print a, b
</code></pre>

python