How to increase the speed of this program?

Fredrik Lundh fredrik at
Tue Nov 28 13:01:56 CET 2006

John Machin wrote:

> I'm extremely agnostic about the spelling :-) IOW I'd be very glad of
> any way [pure Python; e.g. maintaining my own version of the array
> module doesn't qualify] to simply and rapidly create an array.array
> instance with typecode t and number of elements n with each element
> initialised to value v (default to be the zero appropriate to the
> typecode).

     array(t, [v])*n


More information about the Python-list mailing list