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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -