title: Difference between returns and printing in python?
body: <p>In python I don't seem to be understanding the return function. Why use it when I could just print it?</p>
  
  <pre><code>def maximum(x, y):
      if x &gt; y:
          print(x)
      elif x == y:
          print('The numbers are equal')
      else:
          print(y)
  
  maximum(2, 3)
  </code></pre>
  
  <p>This code gives me <code>3</code>. But using return it does the same exact thing.</p>
  
  <pre><code>def maximum(x, y):
      if x &gt; y:
          return x
      elif x == y:
          return 'The numbers are equal'
      else:
          return y
  
  print(maximum(2, 3))
  </code></pre>
  
  <p>So what's the difference between the two? Sorry for the mega noob question!</p>