How do I organise a nested list representing coordinate-values to a coordinate-list
<p>I would like to change my data-structure that get from my data-files in such a way that I get a list of all coordinate-values for every coordinates (so a list for all coordinates filled with values)</p>

<p>e.g.
for i in range (files):</p>

<h3>open file</h3>

<pre><code>file_output = [[0,4,6],[9,4,1],[2,5,3]]
</code></pre>

<h3>second loop</h3>

<pre><code>file_output = [[6,1,8],[4,7,3],[3,7,0]]
</code></pre>

<p>to </p>

<pre><code>coordinates = [[0,6],[4,1],[6,8],[9,4],[4,7],[1,3],[2,3],[5,7],[3,0]]
</code></pre>

<p>It should be noted that I use over 1000 files of this format, which I should merge.</p>

<pre><code>&gt;&gt;&gt; a = [[0,4,6],[9,4,1],[2,5,3]]
&gt;&gt;&gt; b = [[6,1,8],[4,7,3],[3,7,0]]
&gt;&gt;&gt; from itertools import chain
&gt;&gt;&gt; zip(chain(*a),chain(*b))
[(0, 6), (4, 1), (6, 8), (9, 4), (4, 7), (1, 3), (2, 3), (5, 7), (3, 0)]
&gt;&gt;&gt; 
</code></pre>

python list structure coordinates