title: is defining a function first more efficient or is it better to def when is about be used?(see example)
body: <p>on (1) I define a function on the first line.<br>
  on (2) I define the same function on line 5.</p>
  
  <p>which one is faster? is defining a function "closer" to when I need it impractical for the complexity of larger programs(but does it make it faster), or defining a function "far" from where I need it makes a larger program slower when running(but also more practical).</p>
  
  <p>I am using python. of course the difference here is probably in nano seconds but this is just an example. </p>
  
  <p>1-</p>
  
  <pre><code>def t(n1,n2):
      v=n1-n2
      return abs(v)
  a = int(input('how old are you? \n'))
  b = int(input('how old is your best friend? \n'))
  
  c=t(a,b)
  
  if a==b:
      print ('you are both the same age')
  
  else:
      print('you are not the same age\nthe difference of years is %s year(s)' % c)
  
  input()
  </code></pre>
  
  <p>2-</p>
  
  <pre><code>a = int(input('how old are you? \n'))
  b = int(input('how old is your best friend? \n'))
  
  def t(n1,n2):
      v=n1-n2
      return abs(v)
  
  c=t(a,b)
  
  if a==b:
      print ('you are both the same age')
  
  else:
      print('you are not the same age\nthe difference of years is %s year(s)' % c)
  
  input()
  </code></pre>