What is iteration. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is iteration.

1st Oct 2019, 7:10 PM
Balaji
Balaji - avatar
3 Answers
+ 1
Iteration means to repeat the method. For example- if you want to learn coding , you will have to write and practice code daily by your own self. This repetition of writing and practicing can be considered as iteration. Now example in context of code- In python if you want to fetch all the items from a list , you will iterate it by inserting it in a loop i.e. you will repeat the process of fetching element by element in a list by putting it inside a loop List=[1,2,3,4,5,6] #now if you want to print each item of this list, iterate it for element in list: print(element)
3rd Oct 2019, 6:45 AM
namrata garg
namrata garg - avatar
+ 4
In short it is exactly what 🇲 🇮 🇷 🇮 🇪🇱🇱🇪 said. Additionally u can read more abt it here https://en.m.wikipedia.org/wiki/Iteration
1st Oct 2019, 7:47 PM
Minerals2016
Minerals2016 - avatar
+ 3
A repetition, often used to indicate one pass through a loop.
3rd Oct 2019, 11:49 AM
Sonic
Sonic - avatar