It's probably a dumb Python question, anyway: let's say I have a function that takes an object as parameter and returns a new one, letting the input object untouched. I want to apply such function to multiple objects, x1, ..., xn, and I want the output to be named the same as the input, ie x1,...xn.
Basically, it would be x1=f(x1),...,xn=f(xn)
. But I don't want to repeat n times the calls to f.
Is there a Pythonic way to do it?
Edit:
I would like to know if a pack-apply-unpack pattern exists, such as
x1,...,xn = something_that_applies_f(x1,...,xn)