If I have a list and I what to make changes to it.a = [1,2,3,4,5,6,7,8,9]
and maybe I want to drop the odd and double the even numbers and I will
need to do this repeatedly.
How is this best done? That is as a function or class. All I know how to do
is
def doubleeven(alist):
blist = [2*x for
En Thu, 05 Mar 2009 14:43:12 -0200, Vincent Davis
vinc...@vincentdavis.net escribió:
If I have a list and I what to make changes to it.a = [1,2,3,4,5,6,7,8,9]
and maybe I want to drop the odd and double the even numbers and I will
need to do this repeatedly.
How is this best done? That is as
I guess I am thinking of it as an operation that I am preforming on a list
and not making a new list. Also looking to learn better methods. This is
difficult when you are working alone. It is difficult to know where to
improve.
The actual functions I am making are more complicated than this
Vincent Davis wrote:
I guess I am thinking of it as an operation that I am preforming on a list
and not making a new list. Also looking to learn better methods. This is
difficult when you are working alone. It is difficult to know where to
improve.
python occupies a strange place. in some
Please don't top-post.
On Fri, 06 Mar 2009 01:09:48 -, Vincent Davis
vinc...@vincentdavis.net wrote:
I guess I am thinking of it as an operation that I am preforming on a
list
and not making a new list. Also looking to learn better methods. This is
difficult when you are working