Does Python gurantee the traversal order of a list iterator? -
as far can see in python 2.7, iterator of list traverse list in increasing-index order. know if order guaranteed python 2/3, or order defined behavior of list iterator.
in other words, if want traverse list in increasing-index order (and require in such order), , use iterator purpose, possible in later version of python behavior changed?
iterating order guaranteed lists, not dictionaries or sets. holds both python 2 , 3, , unlikely ever changed.
Comments
Post a Comment