Is there a way I can use glob on a directory, to get files with a specific extension, but only the filename itself, not the whole path?
Use glob in combination with os.path.basename.
os.path.basename