Python function returning string which is function name, need to execute the returned statement
<p>1) Function 1 encodes the string</p>

<p>def Encode(String):<br>
   ..<br>
   ..code block<br>
   ..<br>
   return String</p>

<p>2) Function 2 return the string, which actually forms function call of Function 1</p>

<p>def FunctionReturningEncodeFuntionCall(String):<br>
   ..<br>
   ..code block<br>
   ..<br>
   return EncodeFunctionString<br></p>

<p>3) In Function 3 parse the string and pass to Function 2 to form Function 1 call and execute the Function 1 and store its returned value</p>

<p>def LastFuntionToAssignValue(String):<br>
   ..<br>
   ..code block<br>
   ..<br>
   a = exec FunctionReturningMyFuntionCall("abcd") <br>
   print a</p>

<p>Thanks in advance</p>

<p>Consider using the <a href="https://docs.python.org/2.0/ref/exec.html" rel="nofollow">exec statement</a></p>

python string