So far, we have worked primarily within one file; that is, all of our code has been saved in a single .py file and run from that same file. However, in the real world, a lot of our programs will be stored in multiple files. What’s more, we are likely to save some of our favorite code snippets and functions in files for later use. It is just the way we programmers – which includes you now – work.
There are many reasons why we would use multiple files of code. Some of that centers around efficiency and reducing errors in our code – remember our whole bit about saving parts of programs that ...