title: Should I define functions inside or outside of main()?
body: <p>After reading the following, I think I understand the value of wrapping even the simplest of scripts in a main() function.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/5544752/should-i-use-a-main-method-in-a-simple-python-script">Should I use a main() method in a simple Python script?</a></li>
  <li><a href="https://stackoverflow.com/questions/4041238/why-use-def-main">Why use def main()?</a></li>
  </ul>
  
  <p>Should I define all my functions inside or outside main()?</p>
  
  <p>Is there a right or wrong way?  What are the advantages and disadvantages of both approaches?</p>