Creating and using your own modules/libraries

--Originally published at Welcome to the Heaven

Create our own modules/libraries is pretty helpful when we are programming to have an organized code. We can create it with a file .py, that we can call in a program to have a code clear.

If you have some questions about modules and libraries you can see my last post.

I will show you an example of how to make it possible…

screen-shot-2016-10-27-at-11-17-13-pm

In the first file(blog.py) we save the function that we’ll use in our main program, to have it more organized and we only import the module and assign values to the variables.

So now you can make your own modules/libraries and make more organized and clean your code.

screen-shot-2016-10-27-at-11-22-45-pm