Name
basename
Synopsis
basename(path
)
Returns the base name part of path
, just
like
os.path.split(
path
)[1]
.
For example, os.path.basename('b/c/d.e')
returns
'd.e
‘.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.