Multiplying a tuple by a scalar
python, python-imaging-library
Solution
Might be a nicer way, but this should work
tuple([10*x for x in img.size])
Problem
I have the following code: ``` print(img.size) print(10 * img.size) ``` This will print: ``` (70, 70) (70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70) ``` I'd like it to print: ``` (700, 700) ``` Is there any way to do this without having to write: ``` print(10 * img.size[0], 10 * img.size[1]) ``` PS: `img.size` is a PIL image. I don't know if that matters anything in this case.