Python 3.4 - Modules
Modules can be called on to do functions from a list of functions we've created. Basically, image making a list of functions that you want to use, instead of putting them in our code we can make a separate, let's call it 'external function sheet', to store them in.
In order to do this you'll need to import the external function sheet using the import.filename function and when you want to call on a function within your E.F.S. you need to specify the rootfilename like this: filename.functionname().
This with any arguments needed, if needed, will run the function. Again, be sure the files are in the same directory or else specify its location otherwise.
The files need to be in the same directory unless you specify otherwise.
List of modules: https://docs.python.org/3/py-modindex.html
https://www.youtube.com/watch?v=WN4A6iJOUns
In order to do this you'll need to import the external function sheet using the import.filename function and when you want to call on a function within your E.F.S. you need to specify the rootfilename like this: filename.functionname().
This with any arguments needed, if needed, will run the function. Again, be sure the files are in the same directory or else specify its location otherwise.
The files need to be in the same directory unless you specify otherwise.
List of modules: https://docs.python.org/3/py-modindex.html
https://www.youtube.com/watch?v=WN4A6iJOUns
Comments