get current file name in python 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