Search
 
SCRIPT & CODE EXAMPLE
 

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")
Comment

PREVIOUS NEXT
Code Example
Python :: how to round whole numbers in python 
Python :: remove whitespace method 
Python :: numpy insert 
Python :: explode function in python 
Python :: strip plot 
Python :: import sentence transformers 
Python :: add bootstrap to django form 
Python :: python version of settimout 
Python :: matplotlib window size 
Python :: pandas replace values from another dataframe 
Python :: simple python class 
Python :: python strip function 
Python :: Converting time python 
Python :: extend python 
Python :: pytest monkeypatch 
Python :: how to schedule python script in windows 
Python :: object python 
Python :: run ansible playbook python 
Python :: bitbucket rest api python example 
Python :: leetcode python 
Python :: opencv resize image 
Python :: count pairs with given sum python 
Python :: has no attribute pythin 
Python :: python singleton module 
Python :: check permissions django template 
Python :: cmap seaborn 
Python :: python inheritance 
Python :: indent python code 
Python :: python double underscore methods 
Python :: floor python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =