If I have the following Python code
>>> x = []
>>> x = x + [1]
>>> x = x + [2]
>>> x = x + [3]
>>> x
[1, 2, 3]
Will x
be guaranteed to always be [1,2,3]
, or are other orderings of the interim elements possible?
If I have the following Python code
>>> x = []
>>> x = x + [1]
>>> x = x + [2]
>>> x = x + [3]
>>> x
[1, 2, 3]
Will x
be guaranteed to always be [1,2,3]
, or are other orderings of the interim elements possible?