-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Modules | ||
Python modules allows us to reuse our own code or sometimes use somebody else's code. | ||
We can write our own modules or we can use modules written by someone else like `requests`,`datetime` and `etc`. | ||
|
||
**Note**: It's just a `python` file. | ||
|
||
## Built-in Modules | ||
There built-in python modules that come by default. | ||
List can be found here [LIST OF MODULES](https://docs.python.org/3/py-modindex.html) | ||
|
||
- We can import modules by using `import` keyword | ||
- We can also give modules an `alias` when we have long module names like `import random as r`. | ||
- We can also import few functions from the modules `from random import randint`. | ||
- If you want to import everything from random we do something like this `from random import *` | ||
|
||
## Custom Modules | ||
Custom module is just file with python code. |