When using a list comprehension, is the order of the new list guaranteed in any way? As a contrived example, is the following behavior guaranteed by the definition of a list comprehension:
>> a = [x for x in [1,2,3]]
>> a
[1, 2, 3]
Equally, is the following equality guaranteed:
>> lroot = [1, 2, 3]
>> la = [x for x in lroot]
>> lb = []
>> for x in lroot:
lb.append(x)
>> lb == la
True
Specifically, it's the ordering I'm interested in here.