Home / Python Tips Generated By ChatGPT / Using Generators for Lazy Iteration in Python Create iterables that generate items one at a time. Source Code def count_down(n): while n > 0: yield n n -= 1 for i in count_down(5): print(i)