L-7 Modules in Python | Python for Data Science

Publié le: 09 janvier 2021
sur la chaîne: Code With Aarohi
627
18

Explained What is Module and how to create your own module? Also explained how to import Modules and how to use predefined Modules.

If you have any questions with what we covered in this video then feel free to ask in the comment section below & I'll do my best to answer your queries.

Please consider clicking the SUBSCRIBE button to be notified for future videos & thank you all for watching.
Channel: https://www.youtube.com/channel/UCgHD...
Support my channel 🙏 by LIKE ,SHARE & SUBSCRIBE

Check the complete Machine Learning Playlist : https://www.youtube.com/playlist?list...

Check the complete Deep Learning Playlist : https://www.youtube.com/playlist?list...


Contact: aarohisingla1987@gmail.com

Modules and Packages :
In Python, Modules are simply files with the “. py” extension containing Python code that can be imported inside another Python Program. In simple terms, we can consider a module to be the same as a code library or a file that contains a set of functions that you want to include in your application

Module initialization
The first time a module is loaded into a running Python script, it is initialized by executing the code in the module once. If another module in your code imports the same module again, it will not be loaded twice but once only - so local variables inside the module act as a "singleton" - they are initialized only once.

1) User-defined Modules

Create a Module
To create a module, create a Python file with a .py extension.

Call a Module
Modules created with a .py extension can be used in another Python source file, using the import statement.

2) Built-in Modules
There are several built-in modules in Python, which you can import whenever you like.

Call a built-in Module
To call a built-in Module and use the function of that module write:

import moduleName #call a module
moduleName.function()#use module function












#Python for Data Science #Python #ModulesInPython


Sur cette page du site, vous pouvez voir la vidéo en ligne L-7 Modules in Python | Python for Data Science durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Code With Aarohi 09 janvier 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 627 fois et il a aimé 18 téléspectateurs. Bon visionnage!