In Python 3.4+ you can use the pathlib solution from pathlib import Path print(Path(your_path).resolve().stem).
確定! 回上一頁