Recently I was iterating through both a list and a file and I noticed a
difference in behavior.  When I create an iterator for a list by calling
iter(list_name) and then call the iterators  next method I get the first
element in the list.  When I then create another iterator over the same
list and call that iterators next method I again get the first element
of the list, as I expected.  When  I create 2 iterators on a file in the
manner described above that second iterator returns the second line of
the file.  This seems inconsistent.  Am I doing something wrong?  Is
there a reason for this? 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to