How to get only the last part of a path in Python?

后端 未结 9 532
长发绾君心
长发绾君心 2020-11-28 19:01

In Python, suppose I have a path like this:

/folderA/folderB/folderC/folderD/

How can I get just the folderD part?

9条回答
提交回复
热议问题