passing items from list to an empty object in another list
<p>I want to pass items from lists to the empty object in store i.e. I want:</p>

<pre><code>store = [ [['a', 'b'], ['c', 'd']], [] ]
</code></pre>

<p>I am getting an unintended result: </p>

<pre><code>lists = [['a', 'b'], ['c', 'd']]

store = [[], []]


counter = 0
for l in lists:
    for s in store:
        s.append(l)
</code></pre>

<p>which gives me:</p>

<pre><code>store = [[['a', 'b'], ['c', 'd']], [['a', 'b'], ['c', 'd']]]
</code></pre>

<p>The nested for loop is an overkill. You should instead <code>extend</code> the first sublist in <code>store</code> with <code>lists</code>:</p>

<pre><code>lists = [['a', 'b'], ['c', 'd']]
store = [[], []]

store[0].extend(lists)
#     ^ indexing starts from 0
print(store)
# [[['a', 'b'], ['c', 'd']], []]
</code></pre>

<p>Have a look at more on <a href="https://docs.python.org/2/tutorial/datastructures.html#more-on-lists" rel="nofollow"><code>lists</code></a></p>

python list nested-loops