How to modules? In python
So I have been learning python and what interests me the most are modules. But the problem is I don't know how to use them?
Modules are files which contain special functions that Python does not compile. When importing a module, you enable the editor to compile the functions in the module.
I am going to import the module random
But this only imports common functions. To import them all, you do this:
The * means everything.
Now when importing a module, you import lots of functions which takes more storage data. If you want to use a specific one, you can only import that. For example I want to import a function (randint, which chooses a random number), I do this:
You can use it to do fun stuff