I want to apply a function to many different objects, without grouping these objects into another object (like a list or a dictionary). For example, my code could look like this:
termxx = switch_values(termxx)
termyy = switch_values(termyy)
state = switch_values(state)
ori = switch_values(ori)
p1n = switch_values(p1n)
p2n = switch_values(p2n)
p3n = switch_values(p3n)
As you see, the structure is very simple, and I wonder whether I could just write that without repeatig functionname()
all the time.
This is probably a general programming question and has some specific term to it that I don't know. I would appreciate links to / explanations of that concept; specific solutions are welcome for Python.