Which of these is the definition for packages in Python?
A. A set of main modules
B. A folder of python modules
C. A number of files containing Python definitions and statements
D. A set of programs making use of Python modules
Answer: Option B
Solution (By Examveda Team)
In Python, packages are defined as a folder of python modules.A package in Python is a directory that contains a special file named "init.py" along with other Python modules or sub-packages. These modules can be accessed using dot notation. Packages allow you to organize related modules into a hierarchical structure, providing a convenient way to manage and distribute code. By structuring code into packages, you can create reusable components, improve code organization, and facilitate code sharing and collaboration.
Join The Discussion