DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
split string python
file='/home/folder/subfolder/my_file.txt' file_name=file.split('/')[-1].split('.')[0]
Source by docs.python.org #
PREVIOUS
NEXT
Tagged:
#split
#string
#python
ADD COMMENT
Topic
COMMENT
Name
7+4 =
Submit