DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+9 =
Submit