DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python get filename from path
print (os.path.basename("/path/to/file.txt")) # file.txt
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#filename
#path
ADD COMMENT
Topic
COMMENT
Name
8+2 =
Submit