I mean this kind of [generator](https://wiki.python.org/moin/Generators).

For example:
```python
def foobar(n):
    for x in xrange(n):
        yield x ** 2

for num in foobar(10):
    print num
```

Execution of a generator will "pause" when it gets to a `yield` statement and will only continue once that value is consumed.

```python
numbers = foobar(10)
print next(numbers)  # will print 0
print next(numbers)  # 1
print next(numbers)  # 4
```