What if you need to work with a million numbers? If you put them all in a list, you're using megabytes of RAM upfront — even for items you might never reach.
Generators are the solution. They produce values **one at a time, on demand**. The next value only gets computed when you ask for it.
Run both versions. Notice: range() itself is a generator — that's why range(1_000_000) doesn't use any memory.