Kay Schluehr wrote: > The structure of the sequence is not optional. Of course you can also > take the original sequence and apply: >>>> L = list([a1, [a2, [....[aN, [x]]...]]) # shallow copy >>>> L[0] = b
I don't understand the example. Wouldn't you have to do L[1][1]...[1] = b to change x? > but it is intended to change the most inner element. I guess there is > no way in doing it without a deepcopy / full list construction. Yes, if you cannot change the nesting I don't see a way to avoid deepcopy either. Peter -- http://mail.python.org/mailman/listinfo/python-list