How to efficiently proceed addition and subtraction in python list?

Paul Rubin http
Tue Sep 19 02:06:01 EDT 2006


"Daniel Mark" <danielmarkhot at gmail.com> writes:
> 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?

BBB = [x-1 for x in AAA]



More information about the Python-list mailing list