def missing_folders(paths):
 ret = []
 pool = set(paths)
 for path in paths:
  expanded = expand(path)
  for i in range(len(expanded)):
   folder = os.path.join(*expanded[:(len(expanded) - i)])
   if (folder and (folder not in pool)):
    pool.add(folder)
    ret.append(folder)
 return ret

def missing_folders ( paths ) : ret = [ ] pool = set ( paths ) for path in paths : expanded = expand ( path ) for i in range ( len ( expanded ) ) : folder = os . path . join ( * expanded [ : ( len ( expanded ) - i ) ] ) if ( folder and ( folder not in pool ) ) : pool . add ( folder ) ret . append ( folder ) return ret
missing_folders => [a .