Real Python Tutorials

Absolute vs Relative Imports in Python

Absolute vs Relative Imports in Python

If you’ve worked on a Python project that has more than one file, chances are you’ve had to use an import statement before. In this tutorial, you’ll not only cover the pros and cons of absolute and relative imports but also learn about the best practices for writing import statements.

Sep 19, 2018 best-practices intermediate python

— FREE Email Series —

🐍 Python Tricks 💌

Python Tricks Dictionary Merge

🔒 No spam. Unsubscribe any time.

Not Sure Where to Start?

At Real Python you can learn all things Python from the ground up. If you're wondering where to begin your Python journey, click the button below and we'll give you some guidance:

Start Your Python Journey »

🐍 Python Tricks 💌

Get a short & sweet Python Trick delivered to your inbox every couple of days. No spam ever. Unsubscribe any time. Curated by the Real Python team.

Python Tricks Dictionary Merge