Python modules: __name__ == __main__

In our previous post we reviewed how to apply the DRY principle (don’t repeat yourself) to our code and we learned how to create Python modules to avoid repeating ourselves (i.e. cutting-and-pasting code) across scripts and programs. In this post we will see how we can use our modules as a stand-alone program as well as useful functions that can
Read more