Multiply a tuple by a constant

Peter Otten __peter__ at web.de
Fri Feb 13 11:47:59 CET 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