Get last folder of a path

>>> os.path.basename(os.path.normpath('/folderA/folderB/folderC/folderD/'))
'folderD'