+ 1

What is iteration in python?

15th Mar 2018, 5:07 PM
Aditya thakare
Aditya thakare - avatar
5 ответов
+ 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."
15th Mar 2018, 5:44 PM
Ulisses Cruz
Ulisses Cruz - avatar
15th Mar 2018, 5:22 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 1
What is... questions are good candidates for a google search.
15th Mar 2018, 5:41 PM
Ulisses Cruz
Ulisses Cruz - avatar
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 :)
15th Mar 2018, 5:58 PM
Just A Rather Ridiculously Long Username