title: Python functions within lists
body: <p>So today in computer science I asked about using a function as a variable. For example, I can create a function, such as <code>returnMe(i)</code> and make an array that will be used to call it. Like <code>h = [help,returnMe]</code> and then I can say h1 and it would call <code>returnMe("Bob")</code>. Sorry I was a little excited about this. My question is is there a way of calling like <code>h.append(def function)</code> and define a function that only exists in the array?</p>
  
  <p>EDIT:</p>
  
  <p>Here Is some code that I wrote with this!
  So I just finished an awesome FizzBuzz with this solution thank you so much again! Here's that code as an example:</p>
  
  <pre><code>funct = []
  s = ""
  
  def newFunct(str, num):
      return (lambda x: str if(x%num==0) else "")
  
  funct.append(newFunct("Fizz",3))
  funct.append(newFunct("Buzz",5))
  
  for x in range(1,101):
      for oper in funct:
          s += oper(x)
      s += ":"+str(x)+"\n"
  
  print s
  </code></pre>