python function look in the current file code example
Example: python name of current file
from pathlib import Path
print(Path(__file__).stem) #myfile
print(Path(__file__).name) #myfile.py
from pathlib import Path
print(Path(__file__).stem) #myfile
print(Path(__file__).name) #myfile.py