Is a Python list guaranteed to have its elements stay in the order they are inserted in?
<p>If I have the following Python code</p>

<pre><code>&gt;&gt;&gt; x = []
&gt;&gt;&gt; x = x + [1]
&gt;&gt;&gt; x = x + [2]
&gt;&gt;&gt; x = x + [3]
&gt;&gt;&gt; x
[1, 2, 3]
</code></pre>

<p>Will <code>x</code> be guaranteed to always be <code>[1,2,3]</code>, or are other orderings of the interim elements possible?</p>
