title: How to add a function call to a list?
body: <p>I have a Python code that uses the following functions:</p>
  
  <pre><code>def func1(arguments a, b, c):
  
  def func2(arguments d, e, f):
  
  def func3(arguments g, h, i):
  </code></pre>
  
  <p>Each of the above functions configures a CLI command on a product. </p>
  
  <p>In addition, for each of the above functions, there is the de-init function which deletes the CLI command.</p>
  
  <pre><code>def de_init_func1(arguments x, y, z):
  
  def de_init_func2(arguments l, m, n):
  
  def de_init_func3(arguments q, r, s):
  </code></pre>
  
  <p>Suppose I have a script which configures lots of CLI commands using the functions func1, func2 and func3, and before the script completes, the script should remove all the CLI commands that it configured. </p>
  
  <p>For this to happen, each time func1/2/3 is invoked, I need to add the equivalent de_init_func CALL to a list, so by the end of the script, I can iterate this list, and invoke the de-init methods one by one. </p>
  
  <p>How can I add a "func1(arguments) call" to a list without invoking it while adding it to the list. </p>
  
  <p>If I will just add the func1(arguments) call as a string "func1(arguments)", once I will iterate the list, I won`t be able to invoke the function calls because interpreter will refer to the list items as strings and not as function calls...</p>