title: How to dynamically define functions?
body: <p>I have functions like this:</p>
  
  <pre><code>def activate_field_1():
     print 1
  
  def activate_field_2():
     print 2
  
  def activate_field_3():
     print 3
  </code></pre>
  
  <p>How do I define <code>activate_field_[x]</code> for <code>x=1:10</code>, without typing out each one of them? I'd much rather pass a parameter, of course, but for my purposes this is not possible.</p>