title: Two functions with the same name in Python
body: <p>I was just playing around with Python and realized something weird.</p>
  <p>I have the below function:</p>
  <pre><code>def myfun():    #f1
      return 1
  def myfun():    #f2
      return 0
  
  print (myfun())
  </code></pre>
  <p>I changed the values in <code>f1</code> and <code>f2</code>, but still it always seems to be printing the return value of <code>f2</code>. Is there a specific reason?</p>