On Dec 21, 11:53 pm, cjrh <caleb.hatti...@gmail.com> wrote: > Because Python's scoping rules are strict and clean, we can even do > the following: > > my_list_of_functions = [lambda x, i=i : x + j for i in range(10)]
To my shame, this should have been: my_list_of_functions = [lambda x, i=i : x + i for i in range(10)] Apologies for any confusion. It is confusing enough already without my typos adding to the pain!