The Quick Answer: Use os splittext() or pathlib ... Path(path) filename = path_object.stem print(filename) # Returns: SomeImportantFile.
確定! 回上一頁