title: How can I "add" a line of code trough input?
body: <p>How can I &quot;add&quot; a line of code trough input, more specifically, how can I &quot;toggle&quot; a def?
  So for example:</p>
  <pre><code>def func():
      print(&quot;boo&quot;)
  </code></pre>
  <p>Is there an input() function or something, to add</p>
  <pre><code>func()
  </code></pre>
  <p>instead of using if.</p>
  <p>If you want me to specify, I mean: can it be done by something like</p>
  <pre><code>y = input()
  if y == &quot;abc&quot;:
      # add line to code
  </code></pre>