Use for loops where number of iterations is known. Use while otherwise.
for
while
for _ in range(0, 100): if component_ready(): break