Extract file name from path, no matter what the os/path format
Topic starter 09/12/2021 4:23 pm
Which Python library can I use to extract filenames from paths, no matter what the operating system or path format could be?
Topic starter 09/12/2021 4:24 pm
Actually, there's a function that returns exactly what you want
import os print(os.path.basename(your_path))