問題:
I don't understand how looping over a dictionary or set in python is done by 'arbitrary' order.我不明白循環字典或在 python 中設置是如何按“任意”順序完成的。
I mean, it's a programming language so everything in the language must be 100% determined, correct?我的意思是,它是一種編程語言,所以語言中的所有內容都必須 100% 確定,對嗎? Python must have some kind of algorithm that decides which part of the dictionary or set is chosen, 1st, second and so on. Python 必須有某種算法來決定選擇字典或集合的哪一部分,第一、第二等等。
What am I missing?我錯過了什麼?
解決方案:
參考一: https://en.stackoom.com/question/12x2G參考二: https://stackoom.com/question/12x2G