Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (1.6k points)

What's the difference between a Python module and a Python package?

1 Answer

0 votes
by (25.1k points)

You can think of the difference between a module and a package as being almost the same as between a file and a folder respectively.

A module is a file or a collection of files that can be imported with a single import statement.

On the other hand a package is a collection of modules and packages. They are like a directory with __init__.py file.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...