Multiply a tuple by a constant

Peter Otten __peter__ at web.de
Fri Feb 13 05:47:59 EST 2004


These days list comprehensions are preferred:

>>> tuple([5*i for i in (1,2,3)])
(5, 10, 15)





More information about the Python-list mailing list