DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Generators
>>> mygenerator = (x*x for x in range(3)) >>> for i in mygenerator: ... print(i) 0 1 4
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Generators
ADD COMMENT
Topic
COMMENT
Name
4+4 =
Submit