Concatenate two 2 dimensional lists into a new list
<p>DISLCAIMER:  I am new to Python</p>

<p>I would like to create a concatenated 2-D list in Python by combining 2 existing 2-D lists.  I start with 2 lists:</p>

<pre><code>listA = [[a, b, c], [1, 2, 3]]
listB = [[d, e, f], [4, 5, 6]]
</code></pre>

<p>and i want to make a new list (while preserving listA and listB):</p>

<pre><code>listC = [[a, b, c, d, e, f], [1, 2, 3, 4, 5, 6]]
</code></pre>

<p>If I try to add them as with 1-dimensional lists, I get:</p>

<pre><code>listA + listB
result = [[a, b, c], [1, 2, 3], [d, e, f], [4, 5, 6]]
</code></pre>

<p>I have also tried:</p>

<pre><code>listC = listA
listC[0] += listB[0]
listC[1] += listB[1]

# This may be giving me the result I want, but it corrupts listA:

Before: listA = [[a, b, c], [1, 2, 3]
After:  listA = [[a, b, c, d, e, f], [1, 2, 3, 4, 5, 6]]
</code></pre>

<p>What is the right way to make a new list of the data I want?</p>

<p>I could also work with a tuple:</p>

<pre><code>listC = [(a, 1), (b, 2), (c, 3), (d, 4), (e, 5), (f, 6)]
</code></pre>

<p>But don't know the method for that either.</p>

<p>I am currently using Python 2.7 (raspberry pi running raspbian Jessie), but Python 3.4 is available if necessary.</p>

<p>Create a new list, e.g with list-comprehension</p>

<pre><code>listC = [a+b for a,b in zip(listA, listB)]
</code></pre>

python list