title: Stop Iteration error when using next()
body: <p>I am not able to clarify my self over the use of <code>next()</code> in python(3).</p>
  
  <p>I have a data :</p>
  
  <pre><code>chr pos ms01e_PI    ms01e_PG_al ms02g_PI    ms02g_PG_al ms03g_PI    ms03g_PG_al ms04h_PI    ms04h_PG_al
  2   15881989    4   C|C 6   A|C 7   C|C 7   C|C
  2   15882091    4   A|T 6   A|T 7   T|A 7   A|A
  2   15882148    4   T|T 6   T|T 7   T|T 7   T|G
  </code></pre>
  
  <p>and I read it like:</p>
  
  <p><strong>Works fine</strong></p>
  
  <pre><code>c = csv.DictReader(io.StringIO(data), dialect=csv.excel_tab)
  print(c)
  print(list(c))
  </code></pre>
  
  <p><strong>Works fine</strong></p>
  
  <pre><code>c = csv.DictReader(io.StringIO(data), dialect=csv.excel_tab)
  print(c)
  keys = next(c)
  print('keys:', keys)
  </code></pre>
  
  <p><strong>But, now there is a problem.</strong></p>
  
  <pre><code>c = csv.DictReader(io.StringIO(data), dialect=csv.excel_tab)
  print(c)
  print(list(c))
  keys = next(c)
  print('keys:', keys)
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>Traceback (most recent call last):
  2   15882601    4   C|C 9   C|C 6   C|C 5   T|C
  
    File "/home/everestial007/Test03.py", line 24, in &lt;module&gt;
  keys = next(c)
    File "/home/everestial007/anaconda3/lib/python3.5/csv.py", line 110, in __next__
  
      row = next(self.reader)
  
  StopIteration
  </code></pre>
  
  <p><strong>Why does <code>print(keys)</code> after <code>print(list(c))</code> gives <code>StopIteration</code>?</strong> I read the documentation but I am not clear on this particular example.</p>