I'm working in Python and in a class method, I am trying to return an instance variable, but depending on the variable I want to return another instance variable:
def someFunction(self, variable):
return self.variable
This is what I am trying to do, but the variable can have different names. This is in a class. How can I get this to work?