title: Can we print inside a function with a return in Python?
body: <p>I wonder if I can print a message inside a Python function that already returns a value. Would the print output appear when I call it from the main program, or will I just get the value returned?</p>
  
  <p>For example:</p>
  
  <pre><code>def test(x,y)
      if x&gt;y :
          print('x is bigger then y')
          return x
      else:
          print('y is bigger then x')
          return y
  </code></pre>