Code

Examples of Definite and Indefinite Iteration

Definite iteration:

collection = ['hello', 'goodbye'] for item in collection: print(item)

Indefinite iteration:

x = 1 while x < 10: print(x, " is less than 10.") x = x + 1

0

1

Updated 2021-07-21

Tags

Python Programming Language

Data Science