alternately appending elements from two lists
<p>I have three lists with elements :</p>

<pre><code>a = [[0,1],[2,3],...]
b = [[5,6],[7,8],...]

c = []
</code></pre>

<p>I want to append elements from <code>a</code> and <code>b</code> into <code>c</code> to get:</p>

<pre><code>c = [ [0,1],[5,6],[2,3],[7,8],.... ]
</code></pre>

<p>Assuming len(a) == len(b) and you're adding them one by one in turn:</p>

<pre><code>for i in range(len(a)):
        c.append(a[i])
        c.append(b[i])
</code></pre>

<p>However, I would recommend to use <code>c = deque()</code>. Since deques are much quicker if you are making a lot of appends.</p>

python list append