Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

generator comprehension python

# generates 400.. 100.. 0.. 100.. 400
>>> gen_1 = (i**2 for i in [-20, -10, 0, 10, 20])
Source by www.pythonlikeyoumeanit.com #
 
PREVIOUS NEXT
Tagged: #generator #comprehension #python
ADD COMMENT
Topic
Name
3+1 =