> I have a list AAA = [1, 2, 3] and would like to subtract one from list > AAA > so AAA' = [0, 1, 2] > > What should I do?
Sounds like a list comprehension to me: >>> a = [1,2,3] >>> a_prime = [x-1 for x in a] >>> a_prime [0, 1, 2] -tkc -- http://mail.python.org/mailman/listinfo/python-list