title: How can a variable to a function have parameters?
body: <p>Running the code below prints <code>hellohello hellohellohello</code>
  However, I never specified a parameter to either <code>twice</code> variable or <code>thrice</code> variable. 
  Also, I never assigned <code>'hello'</code> to <code>word1</code>. 
  How does it return the answer then? How can <code>twice</code> or <code>thrice</code> take in a parameter and equate it to <code>word1</code>?</p>
  
  <pre><code>def echo(n):
      """Return the inner_echo function."""
  
      def inner_echo(word1):
          """Concatenate n copies of word1."""
          echo_word = word1 * n
          return echo_word
  
      return inner_echo
  
  twice = echo(2)
  thrice = echo(3)
  
  print(twice('hello'), thrice('hello'))
  </code></pre>