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>Using <a href="https://pythonhosted.org/more-itertools/api.html" rel="nofollow"><code>more_itertools</code></a> which implements the <code>itertools</code> <a href="https://docs.python.org/2/library/itertools.html#recipes" rel="nofollow"><code>roundrobin</code> recipe</a></p>

<pre><code>&gt;&gt;&gt; from more_itertools import roundrobin
&gt;&gt;&gt; a = [[0,1],[2,3]]
&gt;&gt;&gt; b = [[5,6],[7,8]]
&gt;&gt;&gt; list(roundrobin(a, b))
[[0, 1], [5, 6], [2, 3], [7, 8]]
</code></pre>

python list append