fork download
  1. import glob
  2.  
  3. ext = '.puk'
  4. dirs = glob.glob("./*/", recursive=True)
  5. match = [dirr for dirr in dirs if all(fname.endswith(ext) for fname in glob.glob(f'{dirr}*'))]
  6. print(match)
  7.  
Success #stdin #stdout 0.02s 9380KB
stdin
Standard input is empty
stdout
[]