relative path python

import os

TEST_FILENAME = os.path.join(os.path.dirname(__file__), 'test.txt')

Here is what the above code is Doing:
1. Importing the os module.
2. Creating a variable called TEST_FILENAME.
3. Setting TEST_FILENAME to the path of the test.txt file.