title: Use retuned value of a function on another object on Python
body: <p>I'm not sure what this is called so I'm unsure what to search for. I have a function which returns a string I need to use the string returned on my instance object.</p>
  
  <pre><code>action = getattr(instance, action_method)(request)
  instance.action
  </code></pre>
  
  <p>But this always evaluate to <code>instance.action</code> where I need it to be the value of action.</p>
  
  <p>I have also tried this:</p>
  
  <p><code>instance.getattr(instance, action_method)(request)</code></p>