def get_ext(filename):
 try:
  return os.path.splitext(filename)[1].lower()
 except:
  return ''

def get_ext ( filename ) : try : return os . path . splitext ( filename ) [ 1 ] . lower ( ) except : return ''
return lowercased file extension .