+ 1
What is iteration in python?
5 Answers
+ 1
A google search gave me this:
"Iteration is a general term for taking each item of something, one after another. Any time you use a loop, explicit or implicit, to go over a group of items, that is iteration. InPython, iterable and iterator have specific meanings. ... So an iterable is an object that you can get an iterator from."
+ 1
+ 1
What is... questions are good candidates for a google search.
0
Iteration basically means doing something repeatedly.
In Python, for example,:
for number in [1, 1, 2, 3, 5]:
print('foo '*number)
Here we 'iterate' over the array (which is known as an iterable by the way) and for each value, we print out 'foo' that many times.
Hope this made sense :)