Skip to content

Instantly share code, notes, and snippets.

@geekli
Created February 20, 2014 01:54
Show Gist options
  • Save geekli/9105567 to your computer and use it in GitHub Desktop.
Save geekli/9105567 to your computer and use it in GitHub Desktop.
paths=[
'/a/b/c',
'/b/d/ee',
'/a/f/b/c',
'/a/b/c/d/e',
'/a/b',
'/a/b/e']
def _inpath( path, paths):
for v in paths:
if _instr(v,path):
return True
return False
def _instr(str, sub):
return str[0:len(sub)]==sub and sub!=str
for v in paths:
if not _inpath(v, paths):
print v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment