title: Calling various function based on input in python 3.x
body: <p>I'm writing some code to get various data from a class (which extracts data from a '.csv' file). I was wondering if there was a way to call one of these methods based off the name of an input</p>
  
  <p>I've attempted to create a function called get(), which takes in 'param_name' - the name of the method contained within the class that I want to call. I was wondering if there was a more elegant way to solve this without creating a large amount of if statements.</p>
  
  <pre><code>def get(param_name):
      # Some initialisation of the .csv file goes here. This works as intended.
  
      list_of_objects = [] # Initialised above, as a list of objects with methods function1(), function2() for getting data out of the .csv
      for item in list_of_objects:
          if param_name == "name of function 1":
              return function1()
          if param_name == "name of function 2":
              return function2()
  </code></pre>