Creating a module in python is nothing more but writing a python file. Let`s do an example:
Imagine you want to use a function that sums up a list. You don`t want to define this function in your main program as this would make the program confusing to use. So you decide to code this function and any other needed functions in a separate file, the sum module. This is how it could be done:
Now you can import this module to your main program and use the sum() function (remember that both files have to be in the same directory!).