Why do we use print statements while defining a function in python? Does it help in debugging? : <p>I am learning python programming and I read somewhere that many a times we use return statement without any output for the purpose of seeing the side effects. Could you explain why is that so? For eg.</p>

<pre><code>def sum(a, b)
      print "enter sum!"
      print "a is", a
      a = a + b
      print "a is", a
print sum(2, 123)
</code></pre>

<p>What is the necessity of writing a print statement here?</p>
