Multiply a tuple by a constant

Jay Davis dj00302003 at yahoo.com
Fri Feb 13 05:20:06 EST 2004


I often need to multiply a tuple by a
constant and the methods I use now are
not very pretty.  The idea is to get a
new tuple that is some factor times the
start tuple, like  'newtup = .5 * oldtup'.

Is there a slick way to do this?



More information about the Python-list mailing list