Remove string from list if from substring list,[l.split('\\')[-1] for l in list_dirs]