Home > Back-end >  About the Python for loop
About the Python for loop

Time:11-05

Magicians=[' Bob ', 'Alice', 'Peter']
For magician in magicians:
Print (magician)

My question is: why Python automatically "in order" to obtain the elements in the list, and traverse the list after automatic stop, not only read the first element of the list and never stopped,
What determines the Python this kind of behavior?
  • Related