os.path.basename()

os.path.basename(path)

Return the base name of pathname path. This is the second element of the pair returned by passing path to the function split(). Note that the result of this function is different from the Unix basename program; where basename for '/foo/bar/' returns 'bar', the basename() function returns an empty string ('').

doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.