I am trying to figure what a iteration step precisely is.
wikipedia gives this explanation about iteration
Iteration in computing is the technique marking out of a block of statements within a computer program for a defined number of repetitions. That block of statements is said to be iterated; a computer scientist might also refer to that block of statements as an "iteration".
The python doc says
The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both the iteration step and halting condition (as C) ...
Consider this example
#include <stdio.h>
int main()
{
int i;
for (i=1; i<=3; i++)
{
printf("%d\n", i);
}
return 0;
}
It is obvious that the total number of steps is equal to 3.
accordingly, the total number of steps is equal to 3 in the following code.
>>> mylist = [1, 2, 3]
>>> for i in mylist:
... print(i**2)
this code print an i^2 at one iteration step, one iteration step is also called a iteration pass.
Is my understanding right?