multiply each element of a list by a number

Brian Blais bblais at
Sat Dec 27 02:30:43 CET 2008

On Dec 26, 2008, at 19:05 , Robert.T.Lynch at wrote:

> but this seems overkill to me.  Can you tell I am coming to Python  
> from Matlab?

if you're coming from matlab, then you should think of python lists  
more like cell arrays than matrices: you can have lists of arbitrary  
data types, so multiply is not going to work in the matrix way.

check out 

but more importantly, you need to install numpy (which has the matrix  
stuff) and scipy (which has the scientific packages).  What I do is  
go to and they have a single-download package  
geared specifically for scientists.


Brian Blais
bblais at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list