How does the Python for loop actually work?
Yes, that’s a good approximation of how the for loop construct is implemented. It certainly matches the for loop statement documentation: The expression list is evaluated once; it should yield an iterable object. An iterator is created for the result of the expression_list. The suite is then executed once for each item provided by the … Read more