Robotics & Artificial Intelligence
Packages are the sub-part of the modules.
Python Modules
3 Likes
Answer
False
Reason — A package is a collection of modules, not a sub-part of a module.
Answered By
2 Likes
Related Questions
What would be the output of the following code?
import pandas as pd # Create a DataFrame data = {'Name':['Jai', 'Ella', 'Mike', 'Pihu'], 'Age':[25, 28, 30, 22], 'City':['New York', 'London', 'Paris', 'Sydney']} df = pd.DataFrame(data) print(df['Age'] > 29)A module can be imported and used in another module or script to access its functions and variables.
A Package is a simple folder that can contain multiple modules.
Modules in Python help in code reusability.