Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python check file format

# Assuming m is a string, you can use endswith:
if m.endswith('.mp3'):
...
elif m.endswith('.flac'):
...
Comment

PREVIOUS NEXT
Code Example
Python :: isprime function in python 
Python :: with font type stuff python turtle 
Python :: python datetime now only hour and minute 
Python :: print type of exception python 
Python :: pandas change dtype to string 
Python :: pandas read_csv drop last column 
Python :: virtual environment mac 
Python :: split a path into all subpaths 
Python :: infinity in python 
Python :: hello world python 
Python :: roc curve python 
Python :: python sendmessage whatsapp 
Python :: how to import image in python 
Python :: insertion sort python 
Python :: How to convert an integer number into words in python? 
Python :: python read csv 
Python :: matplotlib title 
Python :: get time taken to execute python script 
Python :: py sleep function 
Python :: label encoding in pandas 
Python :: OSError: cannot write mode RGBA as JPEG Python 
Python :: make dataframe from list of tuples 
Python :: remove commas from string python 
Python :: read json file python utf8 
Python :: exclude columns pandas 
Python :: pandas to list 
Python :: linear search in python 
Python :: how to find if a value is even or odd in python 
Python :: log scale seaborn 
Python :: AssertionError: Relational field must provide a `queryset` argument, override `get_queryset`, or set read_only=`True` 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =