How to get a filename without a extension in Python
We can get a filename without an extension by using the
os.path.splittext() method in python.
Here is an example that gets a filename without a
import os filename = "/path/files/site/contact.html" print(os.path.splitext(filename))