On 18 Sep 2006 15:43:31 -0700, Daniel Mark <[EMAIL PROTECTED]> wrote: > Hello all: > > I have a list AAA = [1, 2, 3] and would like to subtract one from list > AAA > so AAA' = [0, 1, 2]
You've had some excellent suggestions as to how to go about this assuming that by "efficient" you mean in terms of CPU. If, instead, you are concerned with memory usage, you might instead do something like: for index, value in enumerate(AAA): AAA[index] = value-1 -- Cheers, Simon B, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list