title: How do I use user input to invoke a function in Python?
body: <p>I have several functions such as:</p>
  
  <pre><code>def func1():
      print 'func1'
  
  def func2():
      print 'func2'
  
  def func3():
      print 'func3'
  </code></pre>
  
  <p>Then I ask the user to input what function they want to run using <code>choice = raw_input()</code> and try to invoke the function they choose using <code>choice()</code>. If the user input func1 rather than invoking that function it gives me an error that says <code>'str' object is not callable</code>. Is their anyway for me to turn 'choice' into a callable value?</p>