title: Python Iterators: What does iglob()'s Iterator provide over glob()'s list?
body: <p>Given the piece of code:</p>
  
  <pre><code>from glob import glob, iglob
  
  for fn in glob('/*'):
      print fn
  
  print ''
  
  for fn in iglob('/*'):
      print fn
  </code></pre>
  
  <p>Reading the <a href="http://docs.python.org/library/glob.html" rel="noreferrer">documentation</a> for glob I see that glob() returns a basic list of files and iglob an Iterator. However I'm able to iterate over both and the same list of files is returned by each of them.</p>
  
  <p>I've read the documentation on <a href="http://docs.python.org/glossary.html#term-iterator" rel="noreferrer">Iterator</a> but it hasn't shed anymore light on the subject really!</p>
  
  <p>So what benefit does iglob() returning an Iterator provide me over the list from glob()? Do I gain extra functionality over my old friend the lowly list?</p>