Slice notation in python - need clarification on a code snippet
<p>I'm new to python, and while reading about slice notation, I came across the following code snippet. I was able to understand and use it in very simple examples, but I wasn't able to grasp its usage in the following example. Any explanation will really help!</p>

<pre><code>&gt;&gt;&gt; a = [1,2]
&gt;&gt;&gt; a[1:1] = [3,4,5]
&gt;&gt;&gt; print a
[1, 3, 4, 5, 2]

&gt;&gt;&gt; a = [1,2]
&gt;&gt;&gt; a[0:1] = [3,4,5]
&gt;&gt;&gt; print a
[3, 4, 5, 2]
</code></pre>
