Try:
l = [i+x for i in l]
OR
l = map(lambda i: i+x, l)

-N

Gert Cuykens wrote:
> is there a other way then this to loop trough a list and change the values
>
>         i=-1
>         for v in l:
>                 i=i+1
>                 l[i]=v+x
>
> something like
> 
>         for v in l:
>                 l[v]=l[v]+x

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to