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

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World