On 4/8/2010 1:08 PM M. Hamed said...
On the other hand (other than installing NumPy) is there a built-in
way to do an array full of zeros or one just like the numpy.zeros()? I
know I can do it with list comprehension (like [0 for i in
range(0,20)] but these are too many keystrokes for python :) I was
wondering if there is a simpler way.

map(lambda _:0, range(20))

Emile

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

Reply via email to