title: Python: filter and generator
body: <p>Here is the code:</p>
  
  <pre><code>def _odd_iter():
      n = 1
      while True:
          n = n + 2
          yield n
  def _not_divisible(n):
      return lambda x: x % n &gt; 0
  def primes():
      yield 2
      it = _odd_iter()
      while True:
          n = next(it) 
          yield n
          it = filter(_not_divisible(n), it)
  for n in primes():
      if n &lt; 10:
          print(n)
      else:
          break
  </code></pre>
  
  <p>1. I want to know what is the process about this practice , i was stuck on the</p>
  
  <pre><code>it = _odd_iter()
  </code></pre>
  
  <p>and </p>
  
  <pre><code>it = filter(_not_divisible(n), it)
  </code></pre>
  
  <p>Is the <strong>it</strong> stored value like list or something?</p>