def get_files_from_folder(folder, ext):
 try:
  filesExt = os.listdir(folder)
 except:
  filesExt = []
 filesExt = [f for f in filesExt if f.endswith(ext)]
 return filesExt

def get_files_from_folder ( folder , ext ) : try : filesExt = os . listdir ( folder ) except : filesExt = [ ] filesExt = [ f for f in filesExt if f . endswith ( ext ) ] return filesExt
get the files in folder with the specified extension .