#NEWLINE# def deduplicate_crawl_folders( items , item ) : #NEWLINE# #INDENT# new_list = [ ] #NEWLINE# add = True #NEWLINE# for i in items : #NEWLINE# #INDENT# if ( ( i . find ( ( item + '\\' ) ) == 0 ) or ( i . find ( ( item + '/' ) ) == 0 ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# new_list . append ( i ) #NEWLINE# #UNINDENT# if ( ( ( item + '\\' ) . find ( ( i + '\\' ) ) == 0 ) or ( ( item + '/' ) . find ( ( i + '/' ) ) == 0 ) ) : #NEWLINE# #INDENT# add = False #NEWLINE# #UNINDENT# #UNINDENT# if add : #NEWLINE# #INDENT# new_list . append ( item ) #NEWLINE# #UNINDENT# return new_list