os path splitext

import os
os.path.dirname(os.path.realpath(__file__))

Here is what the above code is Doing:
1. Importing the os module.
2. Using the os.path.dirname() function to get the directory name of the current file.
3. Using the os.path.realpath() function to get the absolute path of the current file.
4. Using the __file__ variable to get the name of the current file.