How to import a python library into a python program?
Python as libraries that add functionality to the basic interpreter of Python,
In order to reduce the size of the program and also to maximise the performance., they are not loaded into the basic interpreter by default. To import a python library into a python program. we simply use the import statement.
This will import the random library into the python program.
The “random” here represent the import library random and the “randint” is a method available from the random library. This comment is actually calling the randint method from the random library with arguement 0 and 1000.
For a full list of libraries available from python, please refer to the python library from the following website: