title: Python: How to use a dictionary to call methods (values in dictionary) to run based on user input (key in dictionary) in a different function?
body: <p>What I have so far:</p>
  
  <pre><code>def run_A():
     # code...
  
  def run_B():
     # code...
  
  def run_C():
     # code...
  
  inputDict = {'a': run_A, 'b': run_B, 'c': run_C, 'q': False}  # q for quit program
  def userChoice(self):
      y = True
      while y:
         choice = input("a. run A\nb. run B\nc. run C\nq. Quit").lower()
         self.inputDict[choice]
  </code></pre>
  
  <p>My issue here is that the program allows the user to input their choice, but the function will be called based on dictionary (won't run) and program will only keep asking user for their choice.</p>