Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get file ending

import os
# creates a tuple.
# fn contains the filename, in this case abc
# fend contains the file ending, in this case .txt
fname, fend = os.path.splitext("/Users/pankaj/abc.txt")
 
PREVIOUS NEXT
Tagged: #python #file
ADD COMMENT
Topic
Name
7+1 =