How to perform a relative import in Python

Performing a relative import results in the accessibility of the subpackage atttributes and methods without needing to reference the base package in dot notation.

Solution for How to perform a relative import in Python : You can use from package import subpackage to perform a relative import Use the syntax from package import subpackage to import subpackage from package.


how-to-perform-a-relative-import-in-python