If I have a dictionary in Python, and I iterate through it once, and then again later, is the iteration order guaranteed to be preserved given that I didn’t insert, delete, or update any items in the dictionary? (But I might have done look-ups).
Share
Here is what
dict.items()documentation says:I think it’s reasonable to assume that item ordering won’t change if all you do is iteration.