L-7 Modules in Python | Python for Data Science

Pubblicato il: 09 gennaio 2021
sul canale di: 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


In questa pagina del sito puoi guardare il video online L-7 Modules in Python | Python for Data Science della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Code With Aarohi 09 gennaio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 627 volte e gli è piaciuto 18 spettatori. Buona visione!