2👍
Python uses a period(.) operator to refer to the directories/modules starting from the current folder and moving upwards in the directory tree with each period.
For example, if you wish to import a file from python_file2.py and the file you are importing is contained in folder2 itself. This can be achieved by-from . import <filename>
If you wish to import a file from python_file2.py and the file rests in folder1, you can add another period(.) to move one directory up and the statement will look like-from ..folder1 import <filename>
filename
is python_file1.py
in your case. Hope this helps.
Source:stackexchange.com