get last element path
>>> os.path.basename(os.path.normpath('/folderA/folderB/folderC/folderD/'))
'folderD'
Are there any code examples left?
New code examples in category Other
>>> os.path.basename(os.path.normpath('/folderA/folderB/folderC/folderD/'))
'folderD'