functional programming with map()
David Eppstein
eppstein at ics.uci.edu
Mon Feb 25 16:14:42 EST 2002
In article <mailman.1014667482.23800.python-list at python.org>,
Steven Majewski <sdm7g at virginia.edu> wrote:
> List comprehensions are declarative (no loops) and they avoid side effects
> (no loop variables or temporaries)
No side effects? Try this:
L = [x for x in range(10)]
print x
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list