Il Thu, 05 Mar 2009 10:46:58 +0100, Peter Otten ha scritto: > mattia wrote: > >>> Note how get_roulette_wheel() is now completeley independent of the >>> concrete problem you are using it for. >> >> Ok, but also a lot more memory consuming ;-) > > I don't think so. Python references objects; therefore the list > > [tiny_little_thing]*N > > does not consume more memory than > > [big_fat_beast]*N > > Or did you have something else in mind? > > Peter
Ok, understood. So if I have e.g. [[200 elements]]*N, then I'll have N pointers to the same location of my seq, right? -- http://mail.python.org/mailman/listinfo/python-list