Relative import in Python 3 is not working

Question or problem about Python programming: I have the following directory: mydirectory ├── __init__.py ├── file1.py └── file2.py I have a function f defined in file1.py. If, in file2.py, I do from .file1 import f I get the following error: Why? And how to make it work? How to solve the problem: Solution 1: since […]

Continue Reading