I was wondering if zip() function is a generator function since it exhausts only after one print. Could anyone clarify this?
            Asked
            
        
        
            Active
            
        
            Viewed 2,009 times
        
    1 Answers
3
            
            
        The zip() function is not a generator function, it just returns an iterators.
See here: The zip() function in Python 3
You can learn more about zip() here: https://docs.python.org/3.3/library/functions.html#zip
 
    
    
        brandonwang
        
- 1,603
- 10
- 17
- 
                    3It is *not* a generator, generator functions return *generators* which are iterators, but not all iterators are generators – juanpa.arrivillaga Jul 13 '19 at 02:34
- 
                    
