Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python generator function

def gen_nums():
    n = 0
    while n < 4:
        yield n
        n += 1
Source by powerfulpython.com #
 
PREVIOUS NEXT
Tagged: #Python #generator #function
ADD COMMENT
Topic
Name
8+9 =