def isFileWithFileTypeWithoutWords(fileType, fileName, words):
 fileName = os.path.basename(fileName)
 fileTypeDot = ('.' + fileType)
 if (not fileName.endswith(fileTypeDot)):
  return False
 for word in words:
  if (fileName.find(word) >= 0):
   return False
 return True

def isFileWithFileTypeWithoutWords ( fileType , fileName , words ) : fileName = os . path . basename ( fileName ) fileTypeDot = ( '.' + fileType ) if ( not fileName . endswith ( fileTypeDot ) ) : return False for word in words : if ( fileName . find ( word ) >= 0 ) : return False return True
determine if file has a given file type .