Join 36000+ teachers and students using TTIO.
Iteration is just referring to loops. Loops involve the repetition of code.
Python has two primitive loop commands:
Print i as long as i is less than 6:
i = 1
while i < 6:
i += 1
Print each fruit in a fruit list:
fruits = ["apple", "banana", "cherry"]
for x in fruits:
Challenge yourself - create planets in a universe using loops