# Infinite for Loop Using while True Logic
count = 0
# for _ in iter(int, 1): creates an infinite loop
# because iter(int, 1) produces a special iterator
# that never returns the sentinel value 1
for _ in iter(int, 1): # infinite loop trick
print("Step:", count)
if count == 3:
print("Breaking out of loop...")
break
count += 1
print("Done.")
'''
run:
Step: 0
Step: 1
Step: 2
Step: 3
Breaking out of loop...
Done.
'''