I know that this is a rather silly question and there are similar ones already answered, but they don\'t quite fit, so... How can I perform the same operation on multiple variab
You can use map to apply a function to every element of a list with a lambda function to perform your operation. Then use list unpacking to overwrite values in orginal variables.
a = 1
b = 2
c = 3
a,b,c = list(map(lambda x: x*2, [a,b,c]))
print(a,b,c)
# prints: (2, 4, 6)
map returns a generator, that's why we need to explicit create the list to unpack.