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

In , suppose I have a path like this:

/folderA/folderB/folderC/folderD/

How can I get just the folderD part?

← Назад к списку