title: Use a string to call function in Python
body: <p>Some days ago I was searching on the net and I found an interesting article about python dictionaries. It was about using the keys in the dictionary to call a function. In that article the author has defined some functions, and then a dictionary with key exactly same as the function name. Then he could get an input parameter from user and call the same method (something like implementing case break)
  After that I realised about the same thing but somehow different. I want to know how I can implement this.
  If I have a function:</p>
  
  <pre><code>def fullName( name = "noName", family = "noFamily" ):
      return name += family
  </code></pre>
  
  <p>And now if I have a string like this:</p>
  
  <pre><code>myString = "fullName( name = 'Joe', family = 'Brand' )"
  </code></pre>
  
  <p>Is there a way to execute this query and get a result: JoeBrand<br>
  For example something I remember is that we might give a string to exec() statement and it does it for us. But I’m not sure about this special case, and also I do not know the efficient way in Python. And also I will be so grateful to help me how to handle that functions return value, for example in my case how can I print the full name returned by that function?</p>