How to efficiently proceed addition and subtraction in python list?

Chiucs chiucs at chipright.com.tw
Tue Sep 19 01:56:04 EDT 2006


try this
a=[1, 2, 3]
b=a[:]

"Daniel Mark" <danielmarkhot at gmail.com> ???
news:1158619411.713865.287810 at m73g2000cwd.googlegroups.com ???...
> Hello all:
>
> 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?
>
>
> Thank you
> -Daniel
>





More information about the Python-list mailing list