Computer Science

What is a library ? Write procedure to create own library in Python.

Python Libraries

3 Likes

Answer

A library refers to a collection of modules that together cater to specific type of requirements or applications.
The procedure to create own library in Python is shown below:

  1. Create a package folder having the name of the library.
  2. Add module files (.py files containing actual code functions) to this package folder.
  3. Add a special file __init__.py to it(even if the file is empty).
  4. Attach this package folder to site-packages folder of Python installation.

Answered By

1 Like


Related Questions