Hallo, you can also look at list comprehension as syntactic sugar for the functions map and filter. The two functions from the functional world can be expressed in a comprehensive way with list comprehension. >>> [x**2 for x in range(10) ] == map ( lambda x: x*x, range(10)) True >>> [ x for x in range(10) if x%2 == 0 ] == filter ( lambda x: x%2 == 0 , >>> range(10)) True
Greetings -- http://mail.python.org/mailman/listinfo/python-list