Chris Johnson <[EMAIL PROTECTED]> wrote: > 2) Is there a better or preferred method than the one I've found? >
Use function default arguments to keep the current value of i at the point where you define the function. a = [(lambda n=i: n) for i in range(10)] -- http://mail.python.org/mailman/listinfo/python-list