Does the for/in loop construct preserve order?

前端 未结 4 1020
谎友^
谎友^ 2021-02-12 11:11

Does an ordinary for/in statement guarantee the list is iterated in order?

my_list = [5,4,3,2]
for i in my_list
    print(i)

That is, is the lo

4条回答
提交回复
热议问题