Difference between module and Package in Python

0 votes
What is the main difference between a Python package and Python module?
Nov 13, 2018 in Python by ana1504.k
• 5,950 points
67 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
A module is basically a single file or number of files that are imported under one import and used. such as :

import my_module
 

Whereas, A package is a collection of modules in directories that give a package hierarchy. such as:

from my_package.timing.danger.internets import function_of_love
answered Nov 13, 2018 by SDeb
• 9,460 points

Related Questions In Python

+1 vote
1 answer

What is the difference between range and xrange functions in Python 2.X?

xrange only stores the range params and ...READ MORE

answered Aug 22, 2018 in Python by Priyaj
• 56,120 points
65 views
+1 vote
1 answer

What's the difference between eval, exec, and compile in Python?

exec is not an expression: a statement ...READ MORE

answered Aug 28, 2018 in Python by Priyaj
• 56,120 points
289 views
0 votes
1 answer

In Python, what is difference between Array and List?

Lists and arrays are used in Python ...READ MORE

answered Mar 15 in Python by Taj
• 240 points

edited Mar 18 by Omkar 106 views
0 votes
1 answer

Python: Module vs package?

A package is represented by an imported ...READ MORE

answered Nov 13, 2018 in Python by Priyaj
• 56,120 points
56 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
20 views
0 votes
1 answer

Difference between Python float and numpy float32

Python's standard float type is a C ...READ MORE

answered Mar 4 in Python by SDeb
• 9,460 points
30 views
0 votes
2 answers

difference between class and instance attributes

Apart from the performance, there is a ...READ MORE

answered Sep 17, 2018 in Python by SDeb
• 9,460 points
20 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.