Packages in Python

A directory must contain a file named __init__.py in order for Python to consider it as a package. This file can be left empty but we generally place the initialization code for that package in this file. We can import modules from packages using the dot (.) operator.
Suppose we are developing a game, one possible organization of packages and modules could be as shown in the figure below.

Package Module Structure in Python Programming

 

For
More Explanation
&
Online Classes

Contact Us:
+919885348743