title: Removing the "none" output that appears
body: <p>Feel embarrassed asking this Q. I have been trying to figure out how to get ride of &quot;None&quot; output that appears from my def Function. My function is to calculate the factorial of a number, but to handle errors, i did a try and except but when i do that I get &quot;None&quot; printed along with it. Thanks in advance for your help.</p>
  <pre><code>def factorial(number):
      &quot;&quot;&quot; This function will calculate the factorial (N!) of a inputted number &quot;&quot;&quot;
      
      output = &quot;null&quot;
      try:
          if int(number) &gt; 0:
              return number * factorial(number - 1)
             
      
          elif number == 0:
              return 1
          
          else:
              return output
      except:
          print(&quot;Error, please ensure you are inputting a integer.&quot;)
  
  print(factorial(&quot;xyz&quot;))
  
  #^ Prints out the proper except block but &quot;None&quot; follows this output. 
  </code></pre>