Creating Modules
You can create your own modules in Python, here is how you can do it:
1.- First you open a file and name ir however you want
2.-Create a function. For example:
*Notice that the name of the file is «kahlid» and the function khalid*
3.- In the file where you want to import the module use this formula: import (name of the file)
4.- To call the function use this: (name of the file).(name of the function). Here is what happens:
References: