Sunday, 29 September 2013

Is Python list.extend() Order Presserving?

Is Python list.extend() Order Presserving?

I'm wondering whether the extend function preserves the order in the two
list.
>> list = [1, 2, 3]
>> list.extend([4, 5])
>> list
[1, 2, 3, 4, 5]
Is extend always working like that way?

No comments:

Post a Comment