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
• 7,890 points
611 views

1 answer to this question.

+1 vote
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
• 13,250 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
• 57,530 points
709 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
• 57,530 points
1,423 views
0 votes
3 answers

In Python, what is difference between Array and List?

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

answered Mar 15, 2019 in Python by Taj
• 1,060 points

edited Mar 18, 2019 by Omkar 67,590 views
0 votes
3 answers
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
• 57,530 points
182 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,081 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, 2019 in Python by SDeb
• 13,250 points
969 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
• 13,250 points
79 views