Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created June 1, 2018 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acwoss/e14ec450075c1857399bd595a75c0eaa to your computer and use it in GitHub Desktop.
Save acwoss/e14ec450075c1857399bd595a75c0eaa to your computer and use it in GitHub Desktop.
NippyDimpledButton created by acwoss - https://repl.it/@acwoss/NippyDimpledButton
x = [1, 2, 3, 4, 5]
y = [2, 4]
def remove_duplicados(l1, l2):
return (i for i in l1 if i not in l2)
z = remove_duplicados(x, y)
print(type(z)) # <class 'generator'>
# Apenas para demonstrar a saída:
print(list(z)) # [1, 3, 5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment