Skip to content

Instantly share code, notes, and snippets.

@hanfei1991
Created September 11, 2018 14:06
Show Gist options
  • Save hanfei1991/1277470ec20fe69b8b513df73fa6f43f to your computer and use it in GitHub Desktop.
Save hanfei1991/1277470ec20fe69b8b513df73fa6f43f to your computer and use it in GitHub Desktop.
a python file
x = ['ab', 'bc', 'de']
y = ['abc', 'b', 'be', 'bce']
def foo(x, y):
for xx in x:
y = list(filter(lambda yy: xx not in yy, y))
return y
print foo(x,y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment