Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split string python

file='/home/folder/subfolder/my_file.txt'
file_name=file.split('/')[-1].split('.')[0]
 
PREVIOUS NEXT
Tagged: #split #string #python
ADD COMMENT
Topic
Name
8+1 =